+ 1
What is the problem in case 5?
#include <stdio.h> int main() { int dollars,pesos; scanf("%d",&pesos); scanf("%d",&dollars); dollars=dollars*50; if(dollars>pesos) { printf("Pesos"); } else { printf("Dollars"); } return 0; }
6 Respostas
+ 1
Just change int to double
+ 1
🥵🥶🤬🤨🤬🤪🤩😡😎🥸😭😢🤩🤩🤬🤬🥸😡🤬🤬🤪😜😭😢😜 not spamming
+ 1
#include <stdio.h>
int main() {
float dollars,pesos;
scanf("%f",&pesos);
scanf("%f",&dollars);
dollars=dollars*50.0;
if(dollars>pesos)
{
printf("Pesos");
}
else
{
printf("Dollars");
}
return 0;
}
0
Atul
Nhi ho raha h yrr
Double me.change karne ke baad to case 1,4,5 bhi nhi chal raha
0
Thanks Atul
0
You have tried to convert two numbers that should be compared on some common criterion...by type casting to int