ASCII VALUE FOR CAPITAL & SMALL LETTER IN C++
#include <iostream>
using namespace std;
int main ()
{
char ch;
cout<<"ASCII VALUE FOR CAPITAL LETTER : "<<endl;
for (ch = 'A'; ch <= 'Z'; ch++)
{
cout<<ch<<" = "<<(int)ch<<endl;
}
cout<<"\n";
cout<<"ASCII VALUE FOR SMALL LETTER : "<<endl;
for (ch = 'a'; ch <= 'z'; ch++)
{
cout<<ch<<" = "<<(int)ch<<endl;
}
return 0;
}
using namespace std;
int main ()
{
char ch;
cout<<"ASCII VALUE FOR CAPITAL LETTER : "<<endl;
for (ch = 'A'; ch <= 'Z'; ch++)
{
cout<<ch<<" = "<<(int)ch<<endl;
}
cout<<"\n";
cout<<"ASCII VALUE FOR SMALL LETTER : "<<endl;
for (ch = 'a'; ch <= 'z'; ch++)
{
cout<<ch<<" = "<<(int)ch<<endl;
}
return 0;
}
OUTPUT
No comments