Write a program to fill the entire screen with a smiling face. The smiling face has an ASCII value 1.
Write a program to fill the entire screen with a smiling face. The smiling face has an ASCII value 1.
- Get link
- X
- Other Apps
Author: Priyanshu Date: October 31, 2020*/
#include<stdio.h>
#include<conio.h>
main()
{
int num,sum,d1,d2,d3,d4;
clrscr();
printf("Enter four digit number:");
scanf("%d",&num);
d1 = num % 10;
num = num / 10;
d2 = num % 10;
num = num / 10;
d3 = num % 10;
num = num / 10;
d4 = num % 10;
sum = d1 +d2-d2 +d3-d3 + d4;
printf("\nSum of first and last digit number = %d",sum);
getch();
return(0);
}
Comments
Post a Comment