0
Can you guys help me to make a program to print all alphabet?
3 Réponses
+ 1
You can do it as Aditya said or do this without the ASCII codes like
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
for(int i='A';i<='Z';i++)
{
cout<<char(i)<<endl;
}
return 0;
}
0
make sure use Array of String then
char [26] apla= [A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z]
THEN use loop
for(x=0;x<apla.length;x++){
cout<<apla[x]<<endl;
}
0
sorry i thought you want in java
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int i;
for(i=65;i<91;i++)
{
printf("%c ",i);
}
return 0;
}