I used to compile in VSCode with mingw-64 in Windows 10.
Please rectify my errors.
[1]: https://i.stack.imgur.com/j5CKZ.jpg [
#include <stdio.h>
int main() {
float rupees,result;
int choice;
printf("Enter 1 for USD
");
printf("Enter 2 for EUR
");
printf("Enter 3 for AUS
");
printf("Enter 4 for UAE Dirham
");
printf("Enter amount in Rupees
");
scanf("%d",&rupees);
printf("Enter your choice
");
scanf("%d",choice);
switch (choice)
{
case 1:
result=rupees*73.04 ;
break;
printf("%f Amount equal to %f USD
",rupees,result);
case 2:
result=rupees*88.82 ;
printf("%f Amount equal to %f EUR
",rupees,result);
break;
case 3:
result=rupees*56.36 ;
printf("%f Amount equal to %f AUS
",rupees,result);
break;
case 4:
result=rupees*19.89 ;
printf("%f Amount equal to %f Dirham
",rupees,result);
break;
default:
printf("Enter correct choice");
break;
}
return 0;
}
question from:
https://stackoverflow.com/questions/65847517/my-program-topped-working-when-i-enter-a-number 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…