|
| ||||||||||
| Tags: c program, count negative number, count numbers, count positive numbers |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| Need C program code to count numbers of negative & positive numbers
I have to write one C program code to count numbers of negative & positive numbers. Suppose we provide three positive and five negative number then output result should show the count of positive number as three and count of negative number as a five. I have one program for this but it is not giving proper result. If you have C program code to count numbers of negative & positive numbers, then please share with me. |
|
#2
| ||||
| ||||
| Re: Need C program code to count numbers of negative & positive numbers
Refer following program to count positive and negative numbers: Quote:
|
|
#3
| |||
| |||
| Re: Need C program code to count numbers of negative & positive numbers
Hi, Have you tried below code to count positive and Negative number ? If not then try this code: Quote:
|
|
#4
| ||||
| ||||
| Re: Need C program code to count numbers of negative & positive numbers
Hi friend, To code the program to print the positive and negative number. You first need to code the logic to determine the positive and negative umber. And then implement the logic to count that numbers. For reference see below code: Quote:
|
|
#5
| ||||
| ||||
| Re: Need C program code to count numbers of negative & positive numbers
You need to use the below for loop code in your program code. This for loop comprise the code to count the positive as well as the negative numbers. Inside for loop I have use one If loop to test the condition for positive and negative number. Try this code and let me know your output. Quote:
|
|
#6
| ||||
| ||||
| Re: Need C program code to count numbers of negative & positive numbers
Hello friend, Try out this code, when you run this program you get the count of negative and positive number as a output result: Quote:
|
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "Need C program code to count numbers of negative & positive numbers" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to change negative numbers to positive numbers in Excel | Shaina Na | Microsoft Project | 3 | 08-01-2012 04:35 PM |
| How can i count numbers on odd/even places? | cowa | Software Development | 1 | 17-11-2009 07:43 AM |
| How to count numbers from a table in C language | MKAIF | Software Development | 3 | 01-10-2009 10:34 PM |
| Automatically display negative numbers in red in Excel 2007 | SpearMan | Tips & Tweaks | 2 | 19-03-2009 11:10 PM |
| SQL Query for Searching Missing Numbers from Sequence of Numbers | Bhagwandas | Software Development | 3 | 18-02-2009 12:47 PM |