How can i make a program which accept only the following:
1) Any positive number.
2)Character from [A to Z] -in upper case.
Note: this program won't work as desired because idon't know how to get the ASCII of any number or character-by using int().
Code:#include<iostream.h> void main() { int a; cout<<"Enter either number or character to check it's availability "<<endl; cin>>a; if(int ('a')>=65 && int('a')<=90) // int('a') always will be 97-the ASCII of character a. cout<<"It's valid"<<endl; }