Let’s say you need to get the value of 10 dollars in INR.
Firstly, set the variables: double usd, inr, val;
Now set the dollars and convert it to INR.
// how many dpllars usd = 10; // current value of US$ val = 69; inr = usd * val;
Let us see the complete code −
Example
using System;
namespace Demo {
public class Program {
public static void Main(string[] args) {
Double usd, inr, val;
// how many dpllars
usd = 10;
// current value of US$
val = 69;
inr = usd * val;
Console.WriteLine("{0} Dollar = {1} INR", usd, inr);
}
}
}Output
10 Dollar = 690 INR