> 其他 >
write a program to read a four digit integer and print the sum of its digits.
Hint :Use / and % operators.
人气:108 ℃ 时间:2020-05-11 04:32:18
解答
#include<stdio.h>int main(){\x05int a,b,c,d,num;\x05printf("please input a num between 1000~9999!\n");\x05scanf("%d",&num);\x05a=num/1000...
推荐
猜你喜欢
© 2024 79432.Com All Rights Reserved.
电脑版|手机版