APC-S-005.c (777B)
1 /* 2 * Author: Amit Dutta (amitdutta4255@gmail.com) | Date: 12 Dec 2025 3 * Repo: https://github.com/notamitgamer/bsc 4 * License: MIT 5 */ 6 7 /* Write to reverse a number. */ 8 9 /* 10 * Compiler Note: This source code is specifically designed for compilation 11 * and execution within the ** Turbo C ** environment. 12 * 13 * Testing Disclaimer: Due to a lack of access to the required Turbo C 14 * compiler software, this code has not been formally compiled or tested. 15 */ 16 17 #include <stdio.h> 18 #include <conio.h> 19 20 void main() 21 { 22 clrscr(); 23 int n, reverse = 0, rem; 24 printf("Enter the numner : "); 25 scanf("%d", &n); 26 while (n != 0) 27 { 28 rem = n % 10; 29 reverse = reverse * 10 + rem; 30 n /= 10; 31 } 32 printf("Reversed Number : %d", reverse); 33 getch(); 34 }