lab9
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main(void){
|
||||
int x;
|
||||
unsigned long input = 0;
|
||||
while((x=getchar())!='\n'
|
||||
&& ((x>='a' && x<='z')
|
||||
|| (x>='A' && x<='Z'))){
|
||||
if (x<=32 && x!='\n' && x!=' ' && x!='\t') return -1;
|
||||
|
||||
printf("%d\t",x);
|
||||
if(x>='a' && x<='z') x -= ('a'-'A');
|
||||
printf("%d\t",x);
|
||||
if(x>='A' && x<='Z') input = (input*100)+(x);
|
||||
|
||||
printf("%d %lu\n",x,input);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user