I'm declaring eruo and nok in both functions and sending euro from main into euro in second function. Something tells me this is wrong and that I should do it another way.Code:#include <stdio.h>
float eur2nok(float euro);
int main(){
float euro;
float nok;
printf("les inn euro: ");
scanf("%f" , &euro);
nok=eur2nok(euro);
printf("%.2f euro = %.2f nok\n", euro, nok);
return 0;
}
float eur2nok(float euro){
float nok;
nok=euro*9.66;
return nok;
}