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

Determine what's wrong in this code and change it.


#include



using namespace std;

int main(){

cout<<"Hello there, please tell me your name?";

char name[50];

cin>>name;

cout<<" Thank you, "< cout<<"Enter 1 or 2\n";

int n;

cin>>n;

if(n==1){

cout<<"True\n";

}

else if(n==2){

cout<<"False\n";

}

else{

cout<<"Invalid\n";

}

cout<<"Enter your birth year:\n";

int year;

cin>>year;

cout<<"Your age is: "<<2021- year<}


All the banks operating in India are controlled by RBI. RBI has set a well￾defined guideline (e.g. minimum interest rate, minimum balance allowed,

maximum withdrawal limit etc) which all banks must follow.

For example, suppose RBI has set minimum interest rate applicable to a

saving bank account to be 4% annually; however, banks are free to use 4%

interest rate or to set any rates above it.

Write a program to implement bank functionality in the above scenario.

Create few classes namely Customer, Account, RBI (Base Class) and two

derived classes (SBI, ICICI). Assume and implement required member

variables and functions in each class.

Create a menu-driven program. Use pure virtual function.



wap to overload the following operators for class distance which stores the distance in feet and inches binary+ to add an object to an integer where the integer should be added to the inches value


WAP to increment member variables by 2 of objects using operator overloading

write a program that determines if the input letter is a VOWEL or CONSONANT.The vowels are:A E I O U.your program must be able to handle a capital or small input letter.

Using a while loop, and appropriate increment/decrement operators.Write a while loop that prints to console all values of the 9 times table from 108 to 9.


You are tasked to make an (almost) useless contraption that tells the user when they have entered either the number 1 or 2 to console.

When the user enters 1 the message “you have entered the number 1” should print to console, and when the user enters 2 the message “you have entered the number 2” should print to console.

Hint: This can be solved by having two conditions in the while loop. You will also need an if statement within the loop.


Create a program that will accept elements from the user, based on the created

node structure above. The number of elements depends on the no. of items

given by the user. Be able to display all the elements.


Write a C++ program to implement a three-player dice game with the following rules:

1. Begin with Player A and roll two dice: dice d1 and dice d2.

2. If the sum of the two dice is odd, then accumulate it as the score of Player A. If even, then the score is 0.

3. Then roll d1 and d2 for Player B.

4. If the sum of the two dice is odd, then accumulate it as the score of Player B. If even, then the score is 0.

5. Then roll d1 and d2 for Player C.

6. If the sum of the two dice is odd, then accumulate it as the score of Player C. If even, then the score is 0.

7. Repeat steps 1 to 6 for n rounds, where n is a positive integer provided as input by the user.


Things to keep in mind:

1. You have to implement three classes, namely Player class, Dice class, and Game class, and a driver program test class that contains the main function.

2. Function in the driver program is: i) Method: int main(). It is the main method in which an object of class Game is created and the method play() is invoked.



Q1) write a simple program in c++ to calculate

1. The circumference of a circle 

2. Area of a triangle 

3. Area of a square 


Q2) write a simple program in c++ to calculate the salary of an employee where by the basic salary will be entered by the user and other allowance as constant.

The following are the other allowance 

1. dressing allowance 30% of basic

2. Fuel allowance 20% of basic 

3. Maintenance allowance 30% of basic 

4. SSNIT allowance 10% of basic 

5. Rent allowance 40% of basic 

Calculate your gross salary


LATEST TUTORIALS
APPROVED BY CLIENTS