![lizatapper3086](/avatars/40346.jpg)
lizatapper3086
04.02.2021 •
Computers and Technology
Someone helpppppppp plz ill give brainiest ASAP its check point paperrrrr
Solved
Show answers
More tips
- G Goods and services How to Choose the Best Publishing House for Your Children s Book: Tips and Recommendations...
- S Science and Technology When do we change our clocks?...
- A Animals and plants How to Teach Your Parrot to Talk?...
- F Family and Home How to Remove Fading from Clothes: Tips and Tricks...
- F Food and Cooking How to Make Polendwitsa at Home?...
- F Family and Home Parents or Environment: Who Has the Most Influence on a Child s Upbringing?...
- P Philosophy Unbelievable stories of encounters with otherworldly forces...
- L Leisure and Entertainment How to Choose the Perfect Gift for Men on February 23rd?...
- H Health and Medicine How to Treat Whooping Cough in Children?...
- H Health and Medicine Simple Ways to Lower Cholesterol in the Blood: Tips and Tricks...
Answers on questions: Computers and Technology
- C Computers and Technology How did collaboration impact the development of your protocol? what challenges did working in a group present and in what ways did it positively impact your final product?...
- C Computers and Technology When a star reaches the black stage of its life , a.it is a very old star b.it will give of new energy c. it will grow in size d. it is a very young star...
- C Computers and Technology What kind of leaders have you had? (Take your time please and thank you)...
- C Computers and Technology Write a function defined as: def GaussJacobi(Aaug, x, niter = 15): Purpose: use the Gauss-Jacobi method to estimate the solution to a set of N linear equations expressed...
- M Mathematics Find the equation of the line that passes through the point (3,-2) and that is perpendicular to the line x=1...
- M Mathematics In a lab environment, colonies of bacteria follow a predictable pattern of growth. The graph shows this growth over time. Bacterial Growth Curve Number of Microbes Complete...
- A Arts -ain 1 - Umisip ng oras na nais mong ilarawan sa iyong tanawin. Pumili ng kulay nagagamitin. Maliwanag ba o madilim? Alalahanin ang mga kombinasyon ng kulayginamit ng mga...
- M Mathematics Find all missing angles....
- S Social Studies How far is it from San Carlos de Bariloche to Buenos Aires? 900 km 600 km 300 km 1200 km Please hurry...
- S Spanish Soy Pepa. 15 años hoy, y la mesa para mi fiesta de la quinceañera. Salgo; pongo Tengo; pongo Hago; traigo Salgo; tengo...
Ответ:
import java.util.Scanner;
public class JavaApplication61 {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
System.out.println("Input String:");
String text = scan.nextLine();
text = text.toLowerCase();
char c = ' ', prevC = ' ';
int count = 0;
for (int i = 0; i < text.length(); i++){
c = text.charAt(i);
if (c == 'h' && prevC == 's' && i >= 1){
count += 1;
}
prevC = c;
}
System.out.println("Contains \"sh\" "+count+" times.");
}
}
This works for me. Best of luck.