0
this code is showing me an error which says "Command failed: ./a.out <input.txt". Can you please help me
#include <stdio.h> #include <math.h> int main() { int a, b, sum = 0; scanf("%d", &a); while(a != 0) { b = a % 10; sum += pow(b,3); a = a/10; } printf("%d", sum); }
5 Answers
+ 1
I wrote it exactly as it is here and it came out normal. You may be missing the return 0; the last one.
+ 1
Lo escribĂ exacto como estĂĄ aquĂ y me saliĂł normal. Puede ser que te falte el return 0; al Ășltimo.
+ 1
You are welcome.
0
@Marco thank you for replying, but I'm barely able to understand anything. Can you please elaborate this in english.
0
@Marco thanks a lot