0% found this document useful (0 votes)
3 views1 page

Introduction

This document presents a sample C program that reverses the digits of a two-digit number input by the user. It checks if the entered number is between 10 and 99 before printing the reversed digits. If the input is not a valid two-digit number, the program does not provide any output.

Uploaded by

Purnendu Bhowmik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

Introduction

This document presents a sample C program that reverses the digits of a two-digit number input by the user. It checks if the entered number is between 10 and 99 before printing the reversed digits. If the input is not a valid two-digit number, the program does not provide any output.

Uploaded by

Purnendu Bhowmik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

SAMPLE PROGRAM: REVERSING THE

DIGITS IN A GIVEN NUMBER OF TWO DIGITS


#include <stdio.h>
int main()
{
int number;
printf("Please enter the number (2 digits) : ");
scanf("%d",&number);

if(number>9 && number<100)


printf("The reversed number is %d%d",number%10,number/10);
else
printf
58
return 0; }
Prepared By Ahmed Abdal Shafi Rasel, Department of CSE

You might also like