Write a program that accepts 10 integer values from iser in an array and passes array and its size to a function . The function makes the odd values stored in the array 2- times the updated array is displayed by main().
1.input a positive integer.This will serve as the starting point of the loop.
2.Using a while()loop, print out all the odd numbers starting from the inputted integer,until 0.The outputted numbers must be separated by line.
3.Also remember that since the loop goes to descending order,a decrement variable shall be created and decreased per iteration for the loop to terminate when it reaches 0
Make a c++ program that will input two numbers and display the sum of numbers. Do this five times. Use function for the computation of the sum.
// Ex . 8.13 : ex08_13.cpp
// What does this program do ?
#include < iostream >
using namespace std ;
void mystery1 ( char *, const char * ) ; // prototype
int main ( )
{
char string1 [ 80 ] ;
char string2 [ 80 ] ;
cout << " Enter two strings : ";
cin >> string1 >> string2 ;
mystery1 ( string1, string2 ) ;
cout << string1 << endl ;
} // end main
// What does this function do ?
void mystery1 ( char * s1 , const char * s2 )
{
while ( * s1 ! = '\0' )
++ s1 ;
for ( ; ( * s1 = * s2 ) ; ++ s1 , ++ s2 )
; / / empty statement
} // end function mystery1
1. Perform the task in each of the following statements:
a) Write the function header for function zero that takes a long integer built-in array parameter bigIntegers and does not return a value.
b) Write the function prototype for the function in part (a).
c) Write the function header for function add1AndSum that takes an integer built-in array parameter oneTooSmall and returns an integer.
d) Write the function prototype for the function described in part (c).
Using the following formula a = p ( 1 + r ) n .write a program that calculates and prints the amount of money in the account at the end of each year for 10 years. the program should use interest rate of 5%, 6%, 7%, 8%, 9%, 10%.
Make a program that will accept an integer and loop for the same number of times as that of the inputted integer and input random integers and add it to the array/list one by one, per line. Afterwards, make your program accept another random integer.
Using that final integer, compare from your array/list if the final integer's value is also present in your current array/list. If so, print "Present"; otherwise, print "None".
Start coding now!
Input
The first line contains the size of the array.
The next lines contain the integers.
The last line contains an integer to be searched.
5
3
21
2
5
23
2
Output
A line containing a string.
Present
Make a c++ program that will print the average of the values of the three quizzes using function. The values of the quizzes are input values from the user.