Write a program that prints all the uppercase characters of the ASCII character table. Display 5 characters per line. Characters are separated by exactly one space.
#include<iostream>
using namespace std;
int main() {
char ch='A';
int i=0;
while(ch !='Z') {
cout<<ch<<' ';
i++; ch++;
if(i%5==0){
cout<<endl;
}
}
cout << endl;
return 0;
}
Comments
Leave a comment