lenyaplay

Задание про числа фибоначи

Mar 27th, 2020
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.22 KB | None | 0 0
  1. #include <stdio.h>
  2. int main()
  3. {
  4.     printf("Введите числo");
  5.     int a,b;
  6.     scanf("%d",&a);
  7.     while(a>0){
  8.         b = b + (a % 10);
  9.         a = a /10;
  10.     }
  11.     printf("%d",b);
  12.     return 0;
  13. }
Add Comment
Please, Sign In to add comment