Illustrative Programs
Program
#include<stdio.h>
void main()
{
int x, y;
float a, b;
printf(“Enter value
for x : ”);
scanf(“%d”, &x);
printf(“\nEnter value
for y : ”);
scanf(%d”,&y);
printf(“\nEnter value
for a : ”);
scanf(“%f”, &a);
printf(“\nEnter value
for b : ”);
scanf(“%f”, &b);
printf(“The values
provided by you are : \n”);
printf(“The integers
are x =%d and y =%d”, x, y);
printf(“The Floats
are a = %f and b = %f”, a, b);
}
Program.
(Illustration with less Quality).
#include<stdio.h>
void main()
{
int x, y;
float a, b;
printf(“Enter value
for x and y : ”);
scanf(“%d%d”, &x,
&y);
printf(“\nEnter value
for a and b : ”);
scanf(“%f%f”, &a,
&b);
printf(“The values
provided by you are : \n”);
printf(“The values
are %d, %d, %f, %f”, x, y, a, b);
}
No comments:
Post a Comment