Quantcast
Channel: Programmers Heaven Forums RSS Feed
Viewing all articles
Browse latest Browse all 2703

selecting a word to do a calculation

$
0
0
I am wanting to write a simple bit of code that converts a currency into US$

I have managed thus far to get it to ask which currency I want to convert now I am not sure where to go from here

#include <stdio.h>
#include <math.h>
int main()
{
	char n1[20];// rand
	char n2[20];// pounds
	char n3[20];// yen

puts("What currency do you want to convert to US$:\n");
scanf("%s",n1,n2,n3);
printf("\n");
printf("You want to convert %s to US$\n",n1,n2,n3);
printf("\n");

return(0);
}


Viewing all articles
Browse latest Browse all 2703

Trending Articles