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

Please put Try Another[Y/N]:

here in this code.


#include <iostream>

using namespace std;

int main(){

int i;

cout<<"Input i: ";

cin>>i;

cout<<"Process = ";

int fact = 1;

int n = 1;

for(int x=i; x>=1; x--){

fact *= x;

cout<<n <<"*";

n++;

}

  cout<<"\nOutput: "<<fact<<endl;

}



The following program takes in temperature value in Celsius and converts it to Kelvin l. This code has many errors in it. Find the errors, list them, and correct the code.






int main ()





(









double C=0;. //declare input variable





cin>>d;. //retrieve temperature to input variable





double K=c+273.15;. //convert temperature





cout <<K>> '/n';. // print out temperature






)

You are asked to write a C++ program to assist a Surgeon with the running of his surgery. Your




program must use functions. This means you must write a function for each of the following tasks:




1) Collect data on each day.




2) Generate a report of how many patients she has seen in the month.




3) Determine the five (5) days in which she made most the money, (five highest earning days).




If there are more than one (1) days in which she made the same amount, just indicate that it




was duplicated on a particular day. Only note or record the last duplicate.




4) Also determine the day on which she saw the least number of patients.




5) Generate a report of how much money she has collected in the month.

Write a Program to declare examination results. Design three classes: Student,

Exam, Result, The Student class has the data members such as Rollno and name.

Create the class Exam by inheriting the Student class. The Exam class includes

the data members representing the marks scored in six subjects. Derive the

Result from Exam class and it has its own data members such as Total_marks,

grade and display the student information in descending order. Design the

inheritance this model belongs to.


Write a program to create a class template having a an array and perform the

following menu based operation on object with integer array , floating point

array


l. Search an user entered element


ll. Sum of all the elements.


lll. Find 2 nd largest element and 2 nd minimum element


Write a program that prompts the user to input two numbers, First and diff. The program then creates a one dimensional array of 10 elements and initializes them with an arithmetic sequence. The first number of the sequence is the First value and the next number is generated by adding the diff to the number preceding it. This formula is repeated for the rest of the sequence. E.g. if First =11 and diff = 4, then the arithmetic sequence will be 11, 15, 19, 23, 27, 31 ... and so on.


 Write a program in C++ to create abstract class Figure having pure virtual function

area(), and data members length, breadth. Derive classes Triangle and Rectangle from

Figure having member functions area(). Find area of triangle and rectangle using run

time polymorphism concept? [Note: sub classes does not contain any data members].


Write a program to create a file and input user defined value to it. Then append new contents and print all the contents from file to output screen.

Write a program to count the number of words present in a file.

write a program to create a class “A” that stores name and age of a student. Create another class “B” that stores two subject marks. Derive another class “C” from “A” and “B” that stores the grade by calculating the following conditions. if average mark >= 90 then grade = ‘O’ else grade is ‘P’. Display all the details of student through the object of class ‘C’


LATEST TUTORIALS
APPROVED BY CLIENTS