Program to print face value of four digit number

//Program to print face value of four digit number
#include<stdio.h>
#include<conio.h>
int main()
{
int a,b,c,d,e;
clrscr();
printf("Enter a Four Digit number ");
scanf("%d",&a);
b=a/1000;a=a%1000;
c=a/100;a=a%100;
d=a/10;a=a%10;e=a;
printf("face value of %d is=%d\nFace value of %d is=%d\nFace value of %d is=%d\nFace value of %d is=%d",
b,b,c,c,d,d,e,e);

getch();
return 0;

}

To Run this Program Copy it in text editor and save as .c
Then double click on it and then it will get opened in your compiler.
Click on run.

No comments:

Post a Comment