S
Silver
I compile it with vstudio .Net, it runs but when I enter a string, I get an
error message
//Program creates char d, sets it equal to lowercase letter
//Converts it to uppercase and outputs it
#include <ctype.h>
#include <iostream.h>
int main()
{
char d[20];
cin >> d;
for (int i = 0; i < 20; i++)
{
if (isalpha(d))
d=toupper(d);
}
cout<<d;
return 0;
}
error message
//Program creates char d, sets it equal to lowercase letter
//Converts it to uppercase and outputs it
#include <ctype.h>
#include <iostream.h>
int main()
{
char d[20];
cin >> d;
for (int i = 0; i < 20; i++)
{
if (isalpha(d))
d=toupper(d);
}
cout<<d;
return 0;
}