bsc

Comprehensive codebase and cou...
Log | Files | Refs | README | LICENSE

commit f15bdb2a1f306f0098833c45c19d2318e788edf0
parent e669d0df6d3dbac6ccb56e42dff832a720d5c924
Author: Amit Dutta <amitdutta4255@gmail.com>
Date:   Wed,  1 Oct 2025 15:29:32 +0530

NEW_COMMIT

Diffstat:
MLetusc-exercises/luc010.c | 33+++++++++++++++++++++++++++++++--
ALetusc-exercises/luc010.exe | 0
2 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/Letusc-exercises/luc010.c b/Letusc-exercises/luc010.c @@ -1 +1,30 @@ -/*hello*/- \ No newline at end of file +/* A five-digit number is entered through the keyboard. Write a program +to obtain the reversed number and to etermine whether the original and reversed +numbers are equal or not. */ +/* Author - Amit Dutta, Date - 1st OCT, 2025 */ +/* Let Us C, Chap - 3, Page - 53, Qn No.: f(a) */ + +#include <stdio.h> +int main() +{ + int num, rev, temp, i; + printf("Please enter the number : "); + scanf("%d", &num); + if (num < 10000 || num > 99999) + { + printf("\nPlease enter a five digit number."); + return 1; + } + temp = num; + for (i = 1; i <= 5; i++) + { + rev = (rev * 10) + num % 10; + num = num / 10; + } + printf("\nReverse of the Input number : %d", rev); + if (rev == temp) + printf("\nOriginal and reversed numbers are equal."); + else + printf("\nOrigianl and reversed numbers are not equal."); + return 0; +}+ \ No newline at end of file diff --git a/Letusc-exercises/luc010.exe b/Letusc-exercises/luc010.exe Binary files differ.
© notamitgamer • Site Built: 2026-07-21 13:58:23 UTC • git-mirror commit: 1037f62 [view raw info]
Originally created with stagit • modified by notamitgamer
Forked from github.com/notamitgamer/git-mirror