Questions: 11 448

Answers by our Experts: 10 707

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

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

  1. Input two integers in one line.
  2. Print the two integers in one line, and separate them with a space.
  3. Print a string message "Equal" on a new line, if both inputted integers are equal.

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.


5.20 (Displaying a Rectangle of Any Character)

–Modify the function created in Exercise 5.19 to form the rectangle out of whatever character is contained in character parameter fillCharacter.

–Thus if the sides are 5 and 4, and fillCharacter is "@", then the function should print the following:


Enter a character to fill the rectangle: a


Enter sides: 4 5


a a a a a

a a a a a

a a a a a

a a a a a


LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS