摘要:
Problem 1000A + B ProblemTime Limit: 1000msMemory Limit: 65536kbDescriptionCalculate a + bInputThe input will consist of a series of pairs of integers a and b,separated by a space, one pair of integers per line.OutputFor each pair of input integers a and b you should output the sum of a and b in one 阅读全文
摘要:
题目:给一个不多于5位的正整数,要求:1、求它是几位数。2、逆序打印出各位数字。思路:分解出每一位上的数字。代码: 1 #include<iostream> 2 using namespace std; 3 4 int main() 5 { 6 int num; 7 cin>>num; 8 9 int wan = num / 10000;10 int qian = num % 10000 / 1000;11 int bai = num % 1000 / 100;12 int shi = num % 100 / 10;13 int ge... 阅读全文