C++ program to read a sentence from user and display it in uppercase letters
#include <iostream>
#include <string.h>
using namespace std;
int main()
{
char sentence[20];
cout<<"Enter a sentence: ";
cin.get(sentence,20);
strupr(sentence);
cout<<"Here is the CAPITAL version:"<<endl<<sentence;
return 0;
}
No comments:
Post a Comment