DESIGN THE A PROGRAM USING C++ LANGUAGE TO DETERMINE THE CAR THET CORRESPONDS TO THE PRICE THAT YOUR YOUR PROGRAM CALCULATED. THE PRICE OF THE CAR IS DETERMINED BY ADDING THREE PRICES:
THE ENGINE PRICE RANGES BETWEEN THE R500000-R2000000
THE COLOUR OF THE CAR RANGES BETWEEN R7000-R10000
THE POWER OF THE CAR RANGES BETWEEN R300000-R600000
IF THE SUM OF THE THREE PRICES S BETWEEN R700000-R1000000,THE PROGRAM MUST DISPLAY THAT THE CAR IS IN THE RANGEOF A VW GOLF 8 GTI
IF THE SUM OF THE THREE PRICES IS BETWEEN R1100000-R1800000,THE PROGRAM MUST DISPLAY THAT THE CA IS IN THE RANGE PF A MERCEDEZ BENZ GIC63s
IF THE SUM OF THE THREE PRICES IS BETWEEN R1900000-R2500000, THE PROGRAM MUST DISPLAY THAT THE CAR IS IN A RANGE OF A BMW M8 CHALLENGER.
WRITE THE PSEUDOCODE FOR THE PROGRAM
In this task, you need to understand two algorithms which can be helpful, the BreadthFirst Search which utilizes the Queue data structure to find the shortest path and the
Depth-First Search which can traverse a Stack data structures.
Hint:
Develop a data structure similar to binary trees. Using a standard 8 X 8 chessboard, show
the knight’s movements in a game. As you may know, a knight’s basic move in chess is
two forward steps and one sidestep. Facing in any direction and given enough turns, it
can move from any square on the board to any other square.
If you want to know the simplest way your knight can move from one square (or node) to
another in a two-dimensional setup, you will first have to build a function like the one
below.
knight plays ([0,0], [1,2]) == [[0,0], [1,2]]
knight plays ([0,0], [3,3]) == [[0,0], [1,2], [3,3]]
knight plays ([3,3], [0,0]) == [[3,3], [1,2], [0,0]]
Find the length of the following strings
char str1[] = "I love C+++ Programming! ";
char str2[] = "This is so cool!";
char str3[] = "Good job learner!";
The output should be like the following format:
The length of str1 is __
The length of str2 is __
The length of str3 is __
Write a C program to implement the following equations:
a) 2x5 - 3x4 + 5x3 - 3x2 + 7x – 9
Where x is the user defined value.
b) x3sin(tan(45)) + 4x + 7cos(90x2)
Where the value of x is a floating point number provided by the user.
Write a c++ program to calculate Gross salary(net salary+DA+TDS) for 4 employees where overload the +
operator for getting the total salary obtained by all the 4 employees. Also get the average salary of employees
by operator overloading. display all the details of all four employees. Also display who is getting highest
salary. Employee salary must be entered by the user at runtime.
A college cafeteria manager conducted a survey to rate the quality of the food. A hundred students were asked using a scale of 1 to 10 with 1 being awful (bad) and 10 being excellent. Write a C++ program that stores the frequency of the students' answers in an integer array. The program should summarize the frequency for each rating in a report form. There are two display options the manager can display the report form or bar chart form.