0
And what's wrong with it
#include <iostream> using namespace std; int main() { int b,c; cin >> b>>c; int a=(b/c)*100; cout <<a; return 0; }
7 Answers
+ 2
Because 3/4 or 80/100 will return 0 here, write float a to get value.
+ 2
reply fast if you are still strucked somewhere. .I have to sleep :p
+ 1
you want to multiply 100 with c or with b/c.
use bracket properly..like b/(c*100) or
(b/c)*100
+ 1
what b and c value you entered?
+ 1
for example
3
4
or
80
100
0
but it still doesn't work
0
could you explain it or write the code with this float command