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 c++ ,program to use function overloading with function template ( max two value)


Assume the following list of keys: 28, 18, 21, 10, 25, 30, 12, 71, 32, 58, 15 This list is to be sorted using insertion sort as described in this chapter for array-based lists. Show the resulting list after six passes of the sorting phase—that is, after six iterations of the for loop.


Assume the following list of keys: 28, 18, 21, 10, 25, 30, 12, 71, 32, 58, 15


This list is to be sorted using insertion sort as described in this chapter for


array-based lists. Show the resulting list after six passes of the sorting


phase—that is, after six iterations of the for loop.

Assume the following list of keys: 16, 38, 54, 80, 22, 65, 55, 48, 64, 95, 5,


100, 58, 25, 36


This list is to be sorted using quicksort as discussed in this chapter. Use


pivot as the middle element of the list.


a. Give the resulting list after one call to the partition procedure.


b. Give the resulting list after two calls to the partition procedure

Write a program that prints the following lines on the screen

 

C++ is a High level Language

It is a language that uses Compiler as language translator

 

This is a case-sensitive language

It is used to solve computational problems of computer

For example 3+9=12

Write the following program in c++.


the project.


Combine your first and second name and pick ony the first five characters of your name for


i.Decare an array named name1 and put al the first five characters into it.


searched character in the array. Let the program be such that the user will input the


ii.Write a for loop with an if condition that will find and output the index value of a


character being searched for.

Write a Person class that has attributes of id, name and address. It has a constructor to initialize, a member function to input and a member function to display data members. Create second class Student that inherits Person class. It has additional data members of roll number and marks. It also has member functions to input and display its data members. Create another class Scholarship that inherits Students class. It has additional attributes of scholarship name and amount. It also has member functions to input and display its data members.


Dry Run the given code:


 int num,r,sum=0,t;


    cin >> num;

     

    for(t=num;  num!=0;  num=num/10)

    {

         r=num % 10;  

         cout<<r<<endl;

         sum=sum*10+r;

         cout<<sum<<endl;


    }




Dry Run the given code:

  1. Take num = 12;

int num; cin>>num;

int t1 = 0;

int t2 = 1;

int newTerm;

for (int i= 1;  i<=num ; i=i+1  ){

    if(i==1){

    cout << t1<< endl;

}

if (i==2){

cout << t2 << endl;

}

newTerm= t1 + t2;

t1= t2;

t2= newTerm;

}




5. Even Out

by CodeChum Admin


You know, I was lying when I said the last time that numbers associated with 3 are my favorite, because the one I actually like the most in the world are even numbers! But to make things harder for you, you have to pick the even numbers from a range of two given numbers. Ha!




Now, let's try this one more time!






Instructions:


Input two integers in one line, separated by a space. The first integer shall represent the starting point, and the other, the ending point.

Print out all even numbers that are within the range of the starting and ending point. Also keep in mind that the starting and ending numbers are also included in your even number evaluation!

Input


A line containing two integers separated by a space.


5·10

Output


A line containing integers separated by a space.


6·8·10


LATEST TUTORIALS
APPROVED BY CLIENTS