Advertisement
Josif_tepe

Untitled

Nov 15th, 2022
773
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.30 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main(){
  5.    
  6.     int N = 156;
  7.     int obraten_broj = 0;
  8.    
  9.     while(N > 0) {
  10.         int cifra = N % 10; // 1
  11.         obraten_broj = (obraten_broj * 10) + cifra; // 65
  12.         N /= 10;
  13.     }
  14.     printf("%d\n", obraten_broj);
  15.     return 0;
  16.  
  17. }
  18.  
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement