Wednesday, March 16, 2011

Program for Currency Conversion

Program that converts the older Pound money system to the latest one.
#include
using namespace std;
void main()
{
int shilling=0,pence=0,pounds=0;

cout<<"Enter Pounds: "; cin>>pounds;
cout<<"Enter Shillings: "; cin>>shilling;
cout<<"Enter Pence: "; cin>>pence;

float ans=(float)pounds + (float)shilling/20 + ((float)pence/12)/20;
cout<<"Conversion yields: "<
}

1 comment:

  1. Cool snippets you post here...
    Participate in challenges on my blog:
    http://recurseit.blogspot.com/p/challenge.html

    ReplyDelete

Please comment, if you like the post, you find any mistake or if you have any query.