Write a program to read the price of an item in decimal form and print the output in paise.

The program is to read the price of an item in decimal form like 15.95 and print the output in paise like 1595 paise.


#include<stdio.h>
main()
{
float n;
int sum;
printf("Enter the value in decimal ");
scanf("%f",&n);
sum = 100 * n;
printf(" \nThe paise is %d.", sum);
getch();
return 0;
}

Output :

Enter the value in decimal 15.95
The paise is 1595.

0 comments:

Post a Comment

 

About Me

It's Me!Hi, I'm Moinuddin. I'm a Software Engineer at WIPRO working on Microsoft .NET Technology. I'm interested in a wide range of technology topics, mainly Microsoft including Windows Azure, WCF, WPF, Silverlight and any other cool technology that catches the eye.

Site Info

ProjectCSharp.com is mainly about demonstrating real time examples in different technologies like ASP.NET, WCF, WPF, Silverlight, Azure etc..,

Followers

Help Links

Project CSharp (C#) Copyright © 2011. All Rights Reserved.