answersLogoWhite

0


Best Answer

#include<stdio.h>

#include<conio.h>

void main()

{

int a[10],count_even=0,count_odd=0,neg=0,i;

printf(" Enter the value in Array \n");

for(i=0;i<10;i++)

scanf("%d", &a[i]);

/* Calculating number of odd and even integer's */

for(i=0;i<10;i++)

{

if((a[i]%2 ==0))

count_even++;

if((a[i]%2==1))

count_odd++;

if(a[i]<0)

neg++;

}

/* display the number of odd and even integer's */

printf(" Total number of even integer are %d\n ",count_even);

printf("Total number of odd integer are %d\n", count_odd);

printf(" Total negative integer are %d", neg);

getch();

}

User Avatar

Wiki User

11y ago
This answer is:
User Avatar
User Avatar

Tafadzwa Kwangware

Lvl 1
2w ago
Not helpful
More answers
User Avatar

aman kumar

Lvl 2
1y ago

#include

#include

int main()

{

int i ,even=0,odd=0;

int a[10];

printf("enter numbers \n");

for(i=0;i

This answer is:
User Avatar

User Avatar

Anonymous

Lvl 1
4y ago

dtuke

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a program in C to accept 10 values in an integer array and show odd even and negative numbers?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write a c program to accept a numbers and generate square root cube and exponential values?

write a c program to accept a number and generate a square root cube and exponential values


Why does the addition of a negative integer and its positive counterpart has a result of 0?

Adding a negative integer is like subtracting a positive one. If you accept that 7 - 7 = 0 (because anything minus itself equals zero) then it stands to reason that 7 + -7 would equal zero as well.


Which variable type do you use to accept only non negative integers and null values?

This is the set of natural numbers.


Is there a proof that irrational numbers can be derived from rationals numbers?

I am not quite sure what you mean with "derive" - what sort of derivation you will accept. If you take the square root of an integer, unless the integer happens to be a perfect square, you get an irrational number. And yes, there is proof of that. The can be found in most high school algebra books.


What function in c plus plus that only accept numbers?

All data is digital in a digital computer -- the numbers are merely an abstraction for real objects, even if those objects are non-numeric (such as people, animals, cars, etc). However, functions that accept actual numbers typically accept int, long, short or char arguments to represent whole numbers (integer values), float or double to represent real numbers (floating point values), or complex data types that are intrinsically numeric, such as std::complex objects.


Write a program to accept 2 numbers and tell whether the product of the two number is equal to or greater than 1000?

C programm


Accept 5 numbers in an array and display it?

Accept 5 numbers in an array and display it.


Can a negative blood type accept blood from a positive type?

Yes. It's the negative blood types that can't accept blood from the positives.


Why do negative ions form?

Negative ions are formed when atoms accept electrons.


Can a positive blood type accept blood from a negative blood type?

Yes. It's the negative blood types that can't accept blood from the positives.


How can you accept sum and print numbers without creating variables?

It is very easy. The program begins here..... /*Program to sum and print numbers without creating variables*/ #include&lt;stdio.h&gt; main() { clrscr(); printf("%d+%d=%d",5,2,5+2); getch(); } /*Program ends here*/ Now just by changing the numbers in the "printf" statement we can add, subtract, multiply and divide the numbers without using variables. Hence the problem is solved..........


What is a program to accept a 3 digit integer and display its octal conversion value?

public class PrintOctal { public static void main(String[] args) { int n = Integer.parseInt(args[0]); System.out.printf("%o\n", n); } }