Strings :
1)Write a program to do the following :
1)To output the question “Who is the inventor of JAVA ?”.
2)To accept an answer.
3)To print out “Good” and then stop, if the answer is correct.
4)To output the message “try again”, if the answer is wrong.
5)To display the correct answer when the answer is wrong even at the third attempt and stop.
2)To accept an answer.
3)To print out “Good” and then stop, if the answer is correct.
4)To output the message “try again”, if the answer is wrong.
5)To display the correct answer when the answer is wrong even at the third attempt and stop.
2)Write a program to extract a portion of a character string and print the extracted string. Assume that m characters are extracted , starting with the nth character.
3)Write a program, which will get text string and count all occurrences of a particular word.
4)Write a program to read the price of an item in decimal form (like 75.95) and print the output in paise (like 7595 paise).
4)Write a program to read the price of an item in decimal form (like 75.95) and print the output in paise (like 7595 paise).
0 comments:
Post a Comment