WAP to insert and print integer no., float no. and character.
#include<stdio.h>
void main()
{
int a,b;
float c,d;
clrscr();
printf("enter the value of integer a=");
scanf("%d",&a);
printf("enter the value of integer b=");
scanf("%d",&b);
printf("enter the value of float c=");
scanf("%f",&c);
printf("enter the value of float d=");
scanf("%f",&d);
printf("a=%d\tb=%d\tc=%f\td=%f",a,b,c,d);
getch();
}
O/P:- Enter the value of integer a=4
Enter the value of integer b =5
Enter the value of float c = 4.5
Enter the value of float d= 7.4
a=4 b=5 c=4.5 d=7.4
No comments:
Post a Comment