Maurice Tutor

(5)

$15/per page/Negotiable

About Maurice Tutor

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Algebra,Applied Sciences See all
Algebra,Applied Sciences,Biology,Calculus,Chemistry,Economics,English,Essay writing,Geography,Geology,Health & Medical,Physics,Science Hide all
Teaching Since: May 2017
Last Sign in: 398 Weeks Ago, 3 Days Ago
Questions Answered: 66690
Tutorials Posted: 66688

Education

  • MCS,PHD
    Argosy University/ Phoniex University/
    Nov-2005 - Oct-2011

Experience

  • Professor
    Phoniex University
    Oct-2001 - Nov-2016

Category > Management Posted 10 Oct 2017 My Price 9.00

Excluding zero,

Write a program that reads a set of integers until a zero is entered. Excluding zero, the program should print a count of and a sum of:

 

positive numbers

 

negative numbers

 

even numbers

 

odd numbers

 

positive even numbers

 

negative odd numbers.

 

all numbers

 

Use debug statements to show cumulative sums as each new number is read and processed.

 

Implement this program incrementally; i.e. first build the loop and test for only one set of conditions (e.g. even and odd). Get that program to work, and then add features to it a little at a time, testing as you go along. If you use "yank and put" in vi (copy and paste) and then modify the copy, you can save yourself alot of typing, since the different sections of this program are very similar to each other.

 

Use #ifdef DEBUG conditional compilation around your debug statements to turn on and off debugging. Turn debugging off when you turn in your program. You can write this program with just a single function, main(). Put the code in a file called numbers.c. A sample output from my program looks like:

15 debug:15 is positive(count = 1, total = 15) debug:15 is odd(count = 1, total = 15) debug:Total(count = 1, total = 15) 2 debug:2 is positive(count = 2, total = 17) debug:2 is even(count = 1, total = 2) debug:2 is positive and even(count = 1, total = 2) debug:Total(count = 2, total = 17) -3 debug:-3 is negative(count = 1, total = -3) debug:-3 is odd(count = 2, total = 12) debug:-3 is negative and odd(count = 1, total = -3) debug:Total(count = 3, total = 14) -8 debug:-8 is negative(count = 2, total = -11) debug:-8 is even(count = 2, total = -6) debug:Total(count = 4, total = 6) 0 There were 2 positive numbers totaling 17 There were 2 negative numbers totaling -11 There were 2 even numbers totaling -6 There were 2 odd numbers totaling 12 There were 1 positive even numbers totaling 2 There were 1 negative odd numbers totaling -3 There were 4 total numbers totaling 6

Answers

(5)
Status NEW Posted 10 Oct 2017 09:10 PM My Price 9.00

Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll

Not Rated(0)