+ 2
Can someone please tell me whats wrong with my code?
#include <stdio.h> int main() { int fruit; scanf("%d", &fruit); //your code goes int apples = fruit / 2; int pies = apples % 3; printf("%d", pies); return 0; }
2 Antworten
+ 6
Angelmar Dayangco ,
int pies = apples / 3;
This is the mistake as you used (%) in place of ( /)...
As (%) gives remainder
+ 1
Nothing it runs perfectly :D