#include<stdio.h>
#include<conio.h>
void main()
{
int num=123,num2;
scanf(“%2d”,&num2);
printf(“First two digits are : %d”,num2);
printf(“\n%d”,num);
printf(“\n%5d”,num);
printf(“\n%0.5d”num);
float number=123.4567;
printf(“\n %6.3f”,number);
printf(“\n %6.3e”,number);
getch();
}
OUTPUT :
First two digits are : 123
123
00123
123.456
1.2345e+02
0 comments:
Post a Comment