Header Ads

programme to print value of veriable (integer and float )

Q. write a programme to print value of variable (integer and float value)


for Integer:-

#include<stdio.h>
#include<conio.h>
void main()
{
int a=8;
clrscr();
printf(" %d",a);
getch();
}


for float:-

#include<stdio.h>
#include<conio.h>
void main()
{
float a;
clrscr();
sacnf("%d",&a);
printf("%f ",a);
getch();
}

Output:

for integer
     8

for float
    3






Thanks for visiting
coding knowledge

No comments:

Powered by Blogger.