Created
May 8, 2016 14:18
-
-
Save danspndl/7e86ae6f3f6396512610412114720dbd to your computer and use it in GitHub Desktop.
Convert String to uppercase
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
#include <stdio.h> | |
#include <ctype.h> | |
using namespace std; | |
int main(){ | |
string s="small"; | |
int i=0; | |
char c2; | |
while(s[i]){ | |
c2=s[i]; | |
if(islower(c2)){ | |
c2=toupper(c2); | |
}; | |
cout<<c2; | |
i++; | |
}; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment