Daily CHALLENGE

DATE:25-12-2017

Q)Error Identification - Square Non Negative Number

A number N is passed as the input. If the number is non-negative, then the output must be the square of N. Else the program must print the output as NEGATIVEBut the program given below has error(s) / missing lines of code in it. Please identify and rectify those error(s).

sol:-
C-CODE:  
Replace printf statement with
printf ("%d",N*N);

Post a Comment

0 Comments