package com.codegym.task.task03.task0303;
/*
Currency exchange
*/
public class Solution {
public static void main(String[] args) {
System.out.println(convertEurToUsd(10,5.50));
System.out.println(convertEurToUsd(5,25.50));
}
public static double convertEurToUsd(int eur, double exchangeRate) {
double usDollars = eur*exchangeRate;
return usDollars;
}
}
Hello. I did my code over in a simpler way. Is this code right?
Under discussion
Comments (1)
- Popular
- New
- Old
You must be signed in to leave a comment
emmanuel
1 August 2019, 13:03
yes
0