Google Ads

Friday, May 29, 2009

Displaying Integral Part

#include”stdio.h”
#include”conio.h”
void main()
{
float a;
int c;
clrscr();
printf("Enter any float no.\n");
scanf("%f",&a);
c=(int)a%100;
printf("The right most digit of integral part is %d",c);
getch();
}



OUTPUT WILL BE

Enter any float no.
546.255
The right most digit of integral part is 46

No comments:

Post a Comment