Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Write a program to enter 10 number of integer entries into
an array n and then odds up all the odd entries. the program
then displays the result.
plssss answer assss fast asss u can...

Answer Posted / avk

I didn't mention in which programing Language U need this so
I wrote in 'C'. I hope U will understand

#include<stdio.h>
#include<conio.h>
void main()
{
int n[i],i,sum=0;
clrscr();
for(i=0;i<10;i++)
{
scanf("%d",&n[i]);
if(n[i]%2==0)
continue;
else
sum+=n[i];
}
printf("Total Of Odd Numbers %d",sum);
getch();
}

Is This Answer Correct ?    32 Yes 19 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Create a program to read two random data set in two files named data1.txt and data2.txt manifold contains integer numbers, whereas data2.txt file contains the float type numbers. Simpanlahmasing each into 2 pieces of data that is an array of type integer array and an array of type float, then calculate the average numbers in the second array.

2567


how to write a program that opens a file and display in reverse order?

3020


i really need help about this.. write a program to display the set of odd and even numbers separately. find the highest and lowest value of the given numbers.

2646


i don't know about working of nested for loop can any one help me

2219


Performance Algorithm A performs 10n2 basic operations and algorithm B performs 300 lg n basic operations. For what value of n does algorithm B start to show its better performance?

7780


Teta-Omeg-Big-Oh Show that f(n) = n2 + 3n3 is ;(n3).

3580


output for printf("printf");

2486


Write a program that print in screen a tree with its height taken from user by entering number of 4 digits and find the odd numbers then calculate the sum of odd numbers so he get the height of tree?

3314


Definition of priority queue was given. We have to implement the priority queue using array of pointers with the priorities given in the range 1..n. The array could be accessed using the variable top. The list corresponding to the array elements contains the items having the priority as the array index. Adding an item would require changing the value of top if it has higher priority than top. Extracting an item would require deleting the first element from the corresponding queue. The following class was given: class PriorityQueue { int *Data[100]; int top; public: void put(int item, int priority); // inserts the item with the given priority. int get(int priority); // extract the element with the given priority. int count(); // returns the total elements in the priority queue. int isEmpty(); // check whether the priority queue is empty or not. }; We had to implement all these class functions.

4896


what mean void creat_object?in public class in this code class A{ public: int x; A(){ cout << endl<< "Constructor A";} ~A(){ cout << endl<< "Destructor A, x is\t"<< x;} }; void create_object(); void main() { A a; a.x=10; { A c; c.x=20; } create_object(); } void create_object() { A b; b.x=30; }

2531


how to diplay a external image of output on winxp by using c & c++,

3402


How to Split Strings with Regex in Managed C++ Applications?

3599


How can I Draw an ellipse in 3d space and color it by using graph3d?

2557


write a program that prompt the user to enter his height and weight,then calculate the body mass index and show the algorithm used

4817


write a program that reverses the input number of n.Formulate an equation to come up with the answer.

7636