Program code
#include <stdio.h>
#include <conio.h>
void main()
{
float a;
clrscr();
printf("Please insert a number.\n");
scanf("%f",&a);
printf("The number you have entered is %.2f",a);
getch();
}
Example of output
Please insert a number.
7.7777
The number you have entered is 7.78
No comments:
Post a Comment