Professional Documents
Culture Documents
BSIT2
1. using System;
namespace Test {
class ExchangeTest
{ static void Main()
{
System.out.println("Enter amount in USD:");
string tmp =
Console.ReadLine();
float dollars;
if(!float.TryParse(tmp, out dollars))
{
Console.WriteLine("Usd”:{0.00.00 x 0.00.00=”php”}");
}
else
{
Console.WriteLine("The value in pesos: {0:0.00}", dollars * 50.74);
}
}
}
}
2. import java.util.Scanner;