Friday, October 1, 2010

to subtract 45 from the decimal ASCII value of character ‘a’. Divide it by 3.5.

to subtract 45 from the decimal ASCII value of character ‘a’. Divide it by
3.5. Print the result up to two decimal places.

int main()
{
char ch='a';
float a=ch;
a-=45;
a/=3.5;
printf("%.2f",a);
getch();
}

No comments:

Post a Comment

Google+ Followers