SHARE
TWEET

שב3 שאלה 3

a guest May 19th, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #define _CRT_SECURE_NO_WARNINGS
  2. #include <stdio.h>
  3.  
  4. void reverse(int n) {
  5.     int reversedNum = 0, a;
  6.     while (n != 0) {
  7.         a = n % 10;
  8.         reversedNum = reversedNum * 10 + a;
  9.         n /= 10;
  10.     }
  11.     printf("%d", reversedNum);
  12. }
  13.  
  14. int main() {
  15.     int Number;
  16.     printf("Enter Your Number\n");
  17.     scanf_s("%d", &Number);
  18.     reverse(Number);
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top