16-12-2005, 21:04
|
|
|
חבר מתאריך: 24.11.05
הודעות: 317
|
|
בבקשה
קוד:
#include <stdio.h>
#include <conio.h>
void main()
{
int I,Number,Num1,Num2,NumOp,NumTot;
for (I=1; I<=6; I++)
{
printf("Enter number No. %d-->",I);
scanf("%d",&Number); //45
Num1=Number/10; //4
Num2=Number%10; //5
NumOp=Num2*10+Num1; //54 // מספר הפוך
NumTot=Num1+Num2; //9 //סכום הספרות
printf("The opposite Number is %d and the total of numbers is %d\n",NumOp,NumTot);
}
printf("\n\nYou end to enter 6 numbers.");
getch();
}
|