Program:
#include<stdio.h>
#include<conio.h>
void main()
{
char ch;
int n;
float ft;
double db;
clrscr();
printf("Enter any Character :");
scanf("%c", &ch);
printf("Enter any Integer :");
scanf("%d", &n);
printf("Enter any Float Value : ");
scanf("%f", &ft);
printf("Enter any Double Value :");
scanf("%lf", &db);
printf("Given Character is :%c", ch);
printf("\nGiven Integer is :%d", n);
printf("\nGiven Float is :%.2f", ft);
printf("\nGiven Double :%.2lf", db);
getch();
}
Output:
Enter any Character : L
Enter any Integer : 20
Enter any Float Value : 45.456
Enter any Double Value : 123.3695
Given Character is : L
Given Integer is : 20
Given Float is : 45.46
Given Double is :123.37
No comments:
Post a Comment