Problem Link: SUGARCANE Problem - CodeChef
so the question says that 20% in sugercane purchase,20% more in salt and stuff and 30%percent for rent
the isnt it clear that 20+20+30 =70 percent goes in stuff and only 30 percent of his income is left as the profit
for is the total cost a glass is 50 rupees and he sells βnβ glasses a day the
would profit not be 30% of his total income??
and if i write code similar to my logic it always prints 0 0 0 0 or 1 1 1 1
my code is as below
include <stdio.h>
int main(void) {
int t,n;
scanf(β%dβ,&t);
while(tβ){
scanf(β%dβ,&n);
printf(β%d\nβ,n50(30/100));
}
return 0;
}