Logo 
Search:

C Programming Articles

Submit Article
Home » Articles » C Programming » Homework HelpRSS Feeds

Program to convert value from one currency to another i.e. from dollar to rupees and rupees to dollar

Posted By: Billy Fischer     Category: C Programming     Views: 11007

Write a program to convert value from one currency to another i.e. from dollar to rupees and rupees to dollar.

Code for Program to convert value from one currency to another i.e. from dollar to rupees and rupees to dollar in C Programming

#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
int r,d,t,code;
printf("enter your code 1 for rupees to dollar\n 2 for dollar to rupee");
scanf("%d",&code);
if(code==1)
{
printf("enter your amount");
scanf("%d",&r);
d=r/(45);
printf("you have dollar %d",d);
}
elseif (code==2)
{
printf("enter your amount");
scanf("%d",&d);
r=d*(45);
printf("you have rupees %d",r);
}
else
printf("invalid code");
getch();
}
  
Share: 



Billy Fischer
Billy Fischer author of Program to convert value from one currency to another i.e. from dollar to rupees and rupees to dollar is from Frankfurt, Germany.
 
View All Articles

Related Articles and Code:


 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!