Create a C program for the following
4. converting the dollar into its peso equivalent
Answers
Answer:
1 dollar = 19.88 peso
Step-by-step explanation:
peso is an Mexican currency
Answer:
Program in C as well as in C ++ is written.
1 United States Dollar = 47.85 Philippine peso
Step-by-step explanation:
using System;
namespace Test
{
class ExchangeTest
{
static void Main()
{
Console.Write("Enter the value in dollars: ");
string tmp = Console.ReadLine();
float dollars;
if(!float.TryParse(tmp, out dollars))
{
Console.WriteLine("Bad input");
}
else
{
Console.WriteLine("The value in pesos: {0:0.00}", dollars * 47.85);
}
}
or
#include<iostream>
using namespace std;
int main() {
float dollar;
float peso;
cout<<"Enter dollars to convert: "<<endl; cin>>dollar;
peso =dollar*47.85;
cout<<"Equivalent peso : "<<peso;
cout<<endl;
system("pause");
return 0;
}