191k views
5 votes
Program 1: I’m buyin’ a Ferrari! If you’ve ever travelled to another country, you know that working with different currencies takes a while to get used to. As of the date of making this assignment, there are 9,240.00 Guinean Francs to $1 USD. For this program, design (pseudocode) and implement (source code) a program that prompts the user for the amount of U.S. currency they have, and converts it into Ginean Francs.

User Tight
by
5.1k points

1 Answer

4 votes

Answer:

// here is code in c++.

#include <bits/stdc++.h>

using namespace std;

int main()

{

// initialize one Guinean_Francs

double Guinean_Francs=9240.00;

int u_s_d;

double tot_Guinean_Francs;

cout<<"enter the amount in U.S dollar:";

// read the dollar

cin>>u_s_d;

// conver it into Guinean_Francs

tot_Guinean_Francs=u_s_d*Guinean_Francs;

print the output

cout<<"total Guinean Francs is :"<<tot_Guinean_Francs<<endl;

return 0;

}

Step-by-step explanation:

Declare and initialize a variable "Guinean_Francs" with 9240.00.Then read the U S dollar from user and assign it to variable "u_s_d".Then multiply u_s_d with Guinean_Francs and assign it to tot_Guinean_Francs. This will be the total Guinean Francs.

Output:

enter the amount in U.S dollar:25

total Guinean Francs is :231000

User Jordyn
by
5.4k points