问题:
Write a program :
Inputs one five-digit number, separates the number into its individual digits
1. Prints the digits separated from one another by three spaces each
2. Prints the addition (and subtraction) of the first threedigit numbers and the last two-digit numbers
For example, for 42139, the program should print
#include<stdio.h>
#include<stdlib.h>
int main(void) {
int num;
printf("Enter a five-digit number:");
scanf_s("%d", &num);
printf("%d %d %d %d %d\n", num / 10000, num / 1000 % 10, num / 100 % 10, num / 10 % 10, num % 10);
printf("Result of addition:%d\n", num / 100 + num % 100);
printf("Result of subtraction:%d\n", num / 100 - (num % 100));
system("pause");
return 0;
}