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 prompts the user to enter the age of a customer.if the age is younger than 15 then ask the user to enter the name of the customer and notify them by name that they qualify a free toy in a if and else statement.


Q1: Write a program to take input for n number of doctor records and write records of all cardiologists in a file named: “record1”. Also write records of all those doctors in another file named: “record2” who are taking salary more than INR 80,000. After writing records in both files, merge their contents in another file: “finalrecord” and read all records of “finalrecord” file and display on screen. [Attributes of doctor: doc_id, doc_name, doc_specialization, doc_salary]


Make a c++ that will calculate the total expenses and cash left of Miss Carla after spending the following:


Cash-4,050.00


B&W perfume-700.50


B&W lotion-560.85


Dresses-2072.50


Note: the program must display the cash left and total expenses.



 Pyramid Schemes

by CodeChum Admin

They said pyramids were created by aliens, so if you can make a pyramid you might be able to qualify as an alien.


Instructions:

  1. In the code editor, you are provided with a main() function that asks the user for an integer input n, and passes this value to the function call of the generatePattern() function.
  2. Your task is to implement this generatePattern() function which has the following description:
  3. Return type - void
  4. Function name - generatePattern
  5. Parameters - 1 integer n
  6. Description - this function prints a triangular pattern of letter T's based on the value of n. For more information, refer to the output in the test cases
  7. DO NOT EDIT ANYTHING IN THE MAIN

Input


1. Integer n

Output


Enter·n:·4
T
TT
TTT
TTTT

Discuss various applications of Initializer List with the help of suitable examples    

Comparing Characters

by CodeChum Admin

Most, if not all things have numeric values. That goes for characters too. In order to find out which character has a higher value, we have to compare them with each other and display the value of the higher character.


Instructions:

  1. In the code editor, you are provided with a main() function that asks the user for 2 characters, passes these characters to a function call of the getHigherValue() function, and then prints out the ASCII value of the higher character.
  2. Your task is to implement the getHigherValue function which has the following details:
  3. Return type - int
  4. Name - getHigherValue
  5. Parameters - 2 characters to be compared
  6. Description - the ASCII value of the higher character.
  7. Hint: Comparing characters in C++ is just like comparing integers.
  8. DO NOT EDIT ANYTHING IN THE MAIN

Input


1. First character

2. Second character

Output


Enter·first·character:·a
Enter·second·character:·h
Result·value·=·104

Create a c++ program that let the user input his/here grade on the following subjects: Programming, web application, oral communication, multimedia and physics and calculate the average.


Note: the program must also display/output the subjects will grades from the user and the average.

Write a program to perform basic to class conversion [Such as there is a class named: “conversion” with data members: feet and inches (both int)] Convert basic type(int) height in terms of total number of inches into equivalent feet and inches (class type) and display output on screen


Write a program to overload operators in the same program by writing suitable operator member



functions for following expression:



O7= ((O1 % O2)>(O3 || O4) - (O5>O6)) [Here O1,O2,O3,O4,O5,O6 and O7 are objects of a class



“overloading”, and this class is having one integer data member]

Write a program to take input for n number of doctor records and write records of all cardiologists in



a file named: “record1”. Also write records of all those doctors in another file named: “record2” who are



taking salary more than INR 80,000. After writing records in both files, merge their contents in another



file: “finalrecord” and read all records of “finalrecord” file and display on screen. [Attributes of doctor:



doc_id, doc_name, doc_specialization, doc_salary]

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS