MIPI_BaseC_WebinarFRTK/03_Lecture03/14_numbers_sum_p32.c
2024-11-13 09:22:28 +03:00

12 lines
178 B
C

#include <stdio.h>
int main()
{
int n=123;
int sum;
sum = n%10; //sum = 3
sum += (n/10)%10; //sum = 5
sum += (n/100)%10; //sum = 6
printf("%d\n",sum);
}