标签:mem highlight pre i++ class 任务 技术 com argc
123 456 555 555 123 594 0 0
0 3 1
#include <iostream>
#include <stdio.h>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char** argv)
{
int n,m;
int count=0;
int a1[3];
int a2[3];
int array1[100];
int array2[100];
int i=0;
do
{
scanf("%d",&n);
scanf("%d",&m);
array1[i]=n;
array2[i]=m;
i++;
}while(n!=0&&m!=0);
for(int j=0;j<i-1;j++)
{
a1[0]=array1[j]/100;
a1[1]=array1[j]/10%10;
a1[2]=array1[j]%10;
a2[0]=array2[j]/100;
a2[1]=array2[j]/10%10;
a2[2]=array2[j]%10;
if(a1[0]+a2[0]>9)
count++;
if(a1[1]+a2[1]>9)
count++;
if(a1[2]+a2[2]>9)
count++;
printf("%d\n",count);
count=0;
}
return 0;
}
标签:mem highlight pre i++ class 任务 技术 com argc
原文地址:http://www.cnblogs.com/panlangen/p/7726317.html