Advertisement

C语言程序设计第十二章课后习题

阅读量:

第一道题目
a

复制代码
    #include <stdio.h>
    #include<string>)
    int main(void)
    {
    	char input[100], ch;
    	int i = 0;
    	printf("Enter a message:");
    	while ((ch = getchar()) != '\n')
    	{
    		input[i] = ch;
    		i++;
    	}
    	printf("Reversal is:");
    	for (; i > 0; i--)
    	{
    		printf("%c", input[i]);
    	}
    	printf("\n");
    	system("pause");
    	return 0;
    }
    
    
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
    

b

复制代码
    #include <stdio.h>

全部评论 (0)

还没有任何评论哟~