write a prog to count and print the no of negative and
positive nos in a given set of nos. Test your prog with
suitable set of nos. Use scanf to read the nos. Reading
should be terminated when the value 0 is encountered.
Answer / Manvir Singh
```cn#include <stdio.h>nint main() {n int num, countPos = 0, countNeg = 0;n while (scanf("%d", &num) != EOF) {n if (num > 0) {n countPos++;n }n else if (num < 0) {n countNeg++;n }n }n printf("Positive numbers: %d
", countPos);n printf("Negative numbers: %d
", countNeg);n return 0;n}n``` Test the program with suitable set of numbers like -5, 3, -1, 7, 0.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is deferent between Windows 2003 server and Windows server2008
CMMI certification procedures
I am a B.B.A (Hons) as a topper of RIMS rourlela, thand did my PGDCRM from Symi Pune.Now I want to go for PMP. Right now am working with IBM as a service management guy and supporting Tata Steel.Can you suggest that shall i go fpr PMP first ot ITIL foundation V2?
i have done my MSc in IT and also cleared my ISTQB Certification... Can anyone please tell me if the CQIA Examination is good enough for me in the IT industry?
Business Content (BCT) is developed? true/false
can anybody send sample question on RHCE exam to my maid id ca6thi@gmail.com
Can anyone pass on the certification dump for informatica 8.x to prshri@gmail.com ? I appreciate your help
Give the centre address of HP UNIX training centre in chennai,and also give the some details of Hp unix training center in chennai
how many max partition are created in redhat linux
Where can I get LAtest qtp 2010 exam questions ?
anyone plz tell me, which r the certification r there for AS/400?
what are the factors effecting the curriculam