任务和代码
/*
*copyright(c)2017,CSDN学院
*All rights reserved.
*文件名称: main.c
*作 者: 杨隆胜
*完成日期: 2017年8月5日
*版 本 号: v1.0
*
*问题描述:编程输入整数a和b,若两数之和大于100,则输出两数和百位以上的数字,否则输出两数之和。
*/
#include <stdio.h>
int main()
{
int iNumber1,iNumber2,iHundred,iSum;
printf("Please input the value of two number:\n");
scanf("%d%d",&iNumber1,&iNumber2);
iSum=iNumber1+iNumber2;
if(iSum>100)
{
iHundred=iSum/100;
printf("The summation of two input number is %d and their hundreds number is %d\n",iSum,iHundred);
}
else
{
printf("The summation of two input number is %d\n",iSum);
}
return 0;
}
心得体会
一个多月没有碰过编程,连最基本的函数输入输出格式都不会了,真是懒惰是如此缓慢,以至于贫穷很快赶上了他