0

What is error in the following code?

#include <stdio.h> int cube (int num); int (main) { int x, result; x=3; result = cube (x) ; printf("%d cubed is %d\n",x,result); return 0; } int cube (int num){ int y; y = num*num*num; return(y); }

25th Dec 2018, 4:30 AM
Abhyoday Singh
Abhyoday Singh - avatar
1 Odpowiedź
+ 1
int main() return y;
25th Dec 2018, 4:36 AM
Igor Kostrikin
Igor Kostrikin - avatar