You are given T names in english letters. Each name will include some of the uppercase letters from A to Z, some of the lowercase letters from a to z and some spaces. You have to transform the name from lowercase to uppercase. The uppercase letters that were uppercase before will remain uppercase and the spaces will also remain in their places.
Input Specification
The first line contains a positive integer T ( 1<=T<=10000 ), denoting the number of test case. The next T lines will contain a name. The length of a name will not exceed 100 characters.
Sample
Input:
5
Hasnain Heickal Jami
Mir Wasi Ahmed
Tarif Ezaz
Mahmud Ridwan
Md Mahbubul Hasan
Output:
Case 1: HASNAIN HEICKAL JAMI
Case 2: MIR WASI AHMED
Case 3: TARIF EZAZ
Case 4: MAHMUD RIDWAN
Case 5: MD MAHBUBUL HASAN
Ugh, you are aware of toupper() existence, are you?
So what is your problem exactly? That cases start with 0? Make outer loop start from 1 instead. That it outputs right after input? You will need to store all input and output them in another loop later.
Well I can't use any library or built in functions...... so toupper() is not for me..........And what my problem is that-why is it printing this? "Case : 0"...... it should not be printed........cause IDK if u have ran it....but if u have u'll know that it first wants how many strings do I wanna convert to upper case letters....The input would be anything in between 1000....Then it should print nothing but should take an input of the string then convert and print......but after taking the T input it print's a "Case : 0".....Than takes the string inputs and prints out "Case 1: HASNAIN HEICKAL JAMI"....... sequally (HASNAIN HEICKAL JAMI for example)...but what i want is that i don't want that "Case : 0" to be printed...why isit printing this on earth????????
You are already using them. getline, stream operations are all library functions.
Ah, it is printing because loops starts with 0 and your code says that it should print "Case <counter>:" on each iteration. Your actual problem is "Why my program don't ask for input on first iteration". And answer is: improper handling of mixed formatted and unformatted input.