Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int i=99;
- char comando[i];
- scanf("%s", &comando);
- int res = comando[0] - '0';
- for(i=1;i<99;i++){
- if(comando[i]==0){
- if(res>0 && res<10){
- printf("O comando é %d", res);}
- else
- printf("é um char");
- i=99;}
- else {
- i=99;
- printf("ERRO");
- }}
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement