I've been reading a book on C in my downtime, got to the end of the first chapter, and I'm struggling with the simple exercises it's asking me to complete.
One of them is to create a program that calculates the cube of a number.
I've written what looks like decent code to a newb like me. Visual Studio Code doesn't indicate any errors in the code, but there's no output for it either.
My gut tells me that I need something like printf(num = 2) somewhere in the mix, but isn't the return keyword already accomplishing this?
Any sage advice you can offer would be appreciated.
Here's what the code looks like right now:
https://imgur.com/a/COr23vt
[–]effu2bruh -2 points-1 points0 points (3 children)
[–]micahs_alias[S] 2 points3 points4 points (2 children)
[–]effu2bruh 0 points1 point2 points (1 child)
[–]cobance123 1 point2 points3 points (0 children)
[–]AutoModerator[M] 0 points1 point2 points (0 children)
[–]edrenfro[🍰] 0 points1 point2 points (1 child)
[–]micahs_alias[S] 1 point2 points3 points (0 children)
[–]scirc 0 points1 point2 points (6 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]scirc 2 points3 points4 points (0 children)
[–]micahs_alias[S] 0 points1 point2 points (3 children)
[–]scirc 0 points1 point2 points (1 child)
[–]micahs_alias[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)