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 / 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 |
write a function that allocates memory for a single data type passed as a parameter.the function uses the new operator and return a pointer to the allocated memory.the function must catch and handle any exception during allocation
Write a program using one dimensional array that searches a number and display the number of times it occurs on the list of 12 input values. Sample input/output dialogue: Enter 12 values: 13 15 20 13 30 35 40 16 18 20 18 20 Enter number to search: 20 Occurences: 3
what is virtual constroctor ? give an exam for it?-(parimal dhimmar)
Write a function- oriented to convert the input dollar(s) into its equivalent peso. Assume that one dollar is equivalent to 51.60
write a program that reverses the input number of n.Formulate an equation to come up with the answer.
Complexity T(n) Write a linear-time algorithm that sorts n distinct integers, each of which is between 1 and 500. Hint: Use a 500-element array. (Linear-time means your algorithm runs in time c*n + b, where c and b are any constants that do not depend on n. For example, your algorithm can run in time n, or time 2n + 1, or time 5n + 10, or time 100n + 6, but not time c*n*n = c*n?.)
Write a (n) algorithm that sorts n distinct integers, ranging in size between 1 and kn inclusive, where k is a constant positive integer. (Hint: Use a kn-element array.)
Write a program that takes a 3 digit number n and finds out whether the number 2^n + 1 is prime, or if it is not prime find out its factors.
5 Answers ADP, Amazon, HCL, IBM, Infosys, Satyam, TCS, Vimukti Technologies,
write a program that calculate the volume of cylinder after user enters radius and height and show the algorithm used
1 Answers Jomo Kenyatta University,
3. Program to find the Sum of give series. a. (1)+(1+2)+(1+2+3)+(1+2+3+4)+……………………………….. b. 1/1+1/9+1/25+1/49+……………...
How can I Draw an ellipse in 3d space and color it by using graph3d?
Display Pattern: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 …