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 Respostas
+ 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