#include <stdio.h>
int main(void)
{
int d[10] = {0} , i ;
char c[10] ;
for(i = 0 ; i < 10 ; i ++) {
scanf("%d" , & d[i]) ;
if(d[i] && ! (d[i] % 12)) c[i] = 'T' ;
else c[i] = 'F' ;
}
printf("%d" , d[0]) ;
for(i = 1 ; i < 10 ; i ++) printf(" %d" , d[i]) ;
printf("\n") ;
printf("%c" , c[0]) ;
for(i = 1 ; i < 10 ; i ++) printf(" %c" , c[i]) ;
printf("\n") ;
}
编译、运行实况:D:\0002.Exercise\C>g++ -o x x.c
D:\0002.Exercise\C>x
5 10 12 8 9 36 7 84 0 96
5 10 12 8 9 36 7 84 0 96
F F T F F T F T F T
D:\0002.Exercise\C>
|