Question: One way to start writing programs is to take a known working program and modify it to do what you want. As a start us

  1. One way to start writing programs is to take a known working program and modify it to do what you want. As a start us the following program and make sure it runs.

/*

* program that prints out negative if the number is less

* than 0 otherwise it prints positive.

*/

#include

int main()

{

int num;

printf("Put in any number");

scanf("%d", &num);

if (num < 0)

{

printf("Negative");

}

else if (num == 0)

{

printf("Zero");

}

else

{

printf("Positvely not negative ");

}

return 0;

}

Now modify the program to continually run until the user enters a -77 Also have the program print out the number at the points that you test for a negative or positive number. If you wish you can set the number being inputted as a float [like -2.73]. Program in C.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!