+ 1
I need help on my array code in C
Please help me on this exercise, I dont know why am I getting no score using my code. Instructions: An array containing 40 integer elements is already provided for you in the code editor below. Using loops and conditions, print out the cube of the array element if it is a positive number, and print out the square of the number if it is negative. Each result must be printed out separately by each line. Output The squares and cubes of the elements in the array. 4 1 1 8 27 . . . https://code.sololearn.com/cXc9Mq3KehQ7/?ref=app
3 Answers
+ 5
It might be as simple as the leading blank space that you print. Have you tried removing that?
+ 1
Great :)
0
thank you @Ani it worked!!!!!!