Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<string.h>
- int main(){
- char ch ;
- int i=0,num;
- while (1){
- printf("Char: ");
- scanf("%c",&ch); fflush(stdin);
- if(ch>='a'&&ch<='z'){
- num = ch-96;
- printf("%d\n",num);
- }else if(ch>='A'&&ch<='Z'){
- num = ch-64;
- printf("%d\n",num);
- }
- else{
- break;
- }
- }
- printf("End\n") ;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement