0

How can i convert lowercase letters into uppercase letters using array?

20th Jul 2016, 11:33 AM
Ajay Choudhury
Ajay Choudhury - avatar
3 Antworten
+ 3
char myLetters []={'a','b'...'z'}; char caps=myLetters[(place in alphabet-1)]-32; cout << caps;
20th Jul 2016, 8:19 PM
destro
+ 1
#include <iostream> using namespace std; int main() { char a[10]; int i; for(i=0;i<10;i++) cin>>a[i]; for(i=0;i<10;i++) a[i]-=32; for(i=0;i<10;i++) cout<<a[i]; return 0; }
22nd Jul 2016, 4:02 PM
Parth Kapil
Parth Kapil - avatar
0
you can also use the "to upper" statement
27th Jul 2016, 6:16 PM
Sanskar Jain
Sanskar Jain - avatar