Q.1/Write a program in C++ language that introduces the salaries of ten teachers in five departments and then finds the average salaries of each department and the average salaries of all teachers in the five departments?
Q: An organization has two types of employees: regular and adhoc. Regular employees get a salary which…
A: Program code: #include <iostream>#include <string>using namespace std; //The Employee…
Q: Write in C Language Description F(x) = x + 1 G(x, y) = x + y Please write a program to…
A: /* C program to calculate the value of composite of F and G */ #include<stdio.h> int F(int x)…
Q: Write a C++ program which stores names of five cities and print the names of only those cities which…
A: Actually, program is a executable software that runs on a computer.
Q: Write a C++ program to read two lengths l1, l2 in the form of meters and centimeters by using a…
A: #include<iostream>using namespace std; class Length { public: int meter; int…
Q: Write a C++ program, which initializes a string variable to the content "Time is a great teacher but…
A: Declare the file stream pointer with the file path. write the string into the file using the…
Q: Write a program in C++ to handle the following scenario: Following is a list of tablets available in…
A: Arrays are utilized to hold multiple values in a single variable. Syntax of declaring an array :…
Q: Write a c program that calculates the potential energy of 3 charges q1=1, q2=2, q3=3 located at…
A: please do upvote for my efforts thanks! answer: code #include…
Q: Q 2/ Write a program in C++ language, to calculate the remaining volume by placing a hard ball…
A: In this question, we are asked to display the remaining volume after dipping a ball in a cube…
Q: Q.1 / Write a program in C ++ language that introduces the salaries of ten teachers in five…
A: logic:- create a 2d matrix of size 5*10 each row will store 10 teachers salary and it will denote…
Q: Write a c program dist.c that calculates the distance between two points and prints the result on…
A: The code is given in step 2.
Q: Write a program in C++ that reads three numbers and finds the middle value between them?
A: C++ program that reads the middle value between them
Q: ·Write a C++ Program that ask the user to get the following information: Name, Birth and Salary…
A: Here we have to write program in c++ using structure. we have to get name salary and birthdate from…
Q: Write a C ++ program to make a calculator that performs division and subtraction of five numbers…
A: C++ Code for the given scenario: #include <iostream>#define N 5 using namespace std; float…
Q: Write a c++ program that asks the user to enter a number and then prints all the divisors of that…
A: #include <iostream> using namespace std; int main(){ int num = 0; cout<<"\n Enter…
Q: Write a program in C++ that has the following: 1.Calculate average Grade from 5 scores. 2.Use…
A: C++ used to answer this question
Q: write a program in C++ that A user needs to determine the size of squares (let say delta) in a grid,…
A: Answer: our instruction is answer the first three subparts from the first part. we have done code
Q: Write a complete C program that inputs a line of text and a search string from the keyboard. Using…
A: Objective: This program would read a line of text from the user along with a search string (a word)…
Q: (a) Consider the pseudo-code in C language definition, comment on the result returned by h? Explain…
A: Objective: A pseudocode is given including three user-defined functions. The output of the program…
Q: Write a C++ program to overload area() function to calculate area of shapes like triangle,square,…
A: Define header file <iostream> for i/o operations. Declare a function area() with one integer…
Q: Write a C program that reads the exam data for each student in a line to be entered from the…
A: Answer in step2
Q: WRITE A PROGRAM IN C++ TO CALCULATE THE PRICE OF AN ITEM COSTING 100 GHANA CEDIS AFTER A DISCOUNT OF…
A: Program Approach - Use the header files as per requirement. Define the main function. Declare the…
Q: Q2. A Technician Engineer in a District Assembly wants to issue only even-numbered stalls to market…
A:
Q: Write a program in C that calculates the voltage value (V) of the voltage source using a Function.…
A: #include<stdio.h> float findVoltage(float R,int I){ float voltage; voltage=I*R;//voltage =…
Q: Write a program in c++ that prints the next leap year.
A: In this question we are asked to print the next leap year in C++ Logic to find the leap year; if…
Q: In c++, write a unit conversion program that asks which unit to convert from and which unit to…
A: #include<bits/stdc++.h>using namespace std;int main() { float mag; cout<<"Enter the…
Q: Display following menu given below. Enter p for Panadol Enter d for Disprin Enter c for Calpol Enter…
A: Editable Code in C++ :- #include <iostream> using namespace std; int main() { //Menu…
Q: Write a program c++ to read the birth date (year, month, day) and read the current date (year,…
A: The first step is the header statements used to take the input and output statements from the users.…
Q: Write a program in C to check whether a number is a prime number or not using the function.(with…
A: The programming methodology for the program is given by: Including header files Function prototype…
Q: Q2 /I write a program in C++ language that converts the temperature from F to C using the concept of…
A: #include<iostream>using namespace std;int main(){ float C,F; cout<<"Enter the…
Q: Write a program in C Plus to read about ten students A specific subject matter where the information…
A:
Q: write a C program that has the following statements int a,b; a = 10; b = a + fun(); printf("With…
A: I have given an answer in step 2.
Q: Write a program in C that accept the student registration number as input and print the product of…
A: Objective: This program reads the student registration number as user input and computes the product…
Q: Paste three test cases at the end of the program( put them in comment area)
A: C++ program to generate all combination of well formed parentheses
Q: Write a C program for a match-stick game between the computer and a user. Your program should ensure…
A:
Q: First: Write a program in C++ by using function overloading that multiply: Two integer numbers Two…
A: Function Overloading: Multiple functions have the same name but different parameters are called…
Q: 1. Write a complete C program that reads the temperature of five cities in the last week then print…
A: Please give positive ratings for my effort. Thanks. PROGRAM…
Q: Write a program in C++ to read a sequence of integer numbers until a negative number is entered,…
A: Input the numbers in a vector. Create a function to find and print the sum of numbers in the vector.
Q: Write a C++ program to calculate the sum of marks of three students by passing object to a function…
A: When we consider a C++ program, it can be defined as a collection of objects that communicate via…
Q: Write a program (C,C++ or any other language) where a shop owner can input daily sales and calculate…
A: I am using c++ Algorithm: Start Read no.of days n Read sales for n days in an array a Read price of…
Q: write a program in C++, to create a class for calculate the volume of 3 boxes using class and…
A: Program Approach: Include header file. Defining a class "Box" inside the class three integer…
Q: Write a program that reads a C program and prints in alphabetical order each group of variable names…
A: #include<stdio.h>#include<string.h>#include<stdlib.h> #define BUFSIZE 1000#define…
Q: Write a program in C language to simulate tossing a “fair” coin. Allow the user to enter the number…
A: Write a program using c language that will take a number of tosses as input and find the number of…
Q: Write a C++ program that play the Card Guesssing Game. Your program must give the user the following…
A: The, code has given below:
Step by step
Solved in 3 steps with 1 images
- Write a program in C++, where: An organization has two types of employees: regular and adhoc. Regular employees get a salary which is basic + DA + HRA where DA is 10% of basic and HRA is 30% of basic. adhoc employees are daily wagers who get a salary which is equal to Number*wage.Write a program in C++ that reads HAND_SIZE cards from the user, then analyzes the cards and prints out the type of poker hand that they represent. (HAND_SIZE will be a global constant, typically 5, but your program must still work if it is set to something other than 5.) Poker hands are categorized according to the following hand-types: Straight flush, four of a kind, full house, straight, flush, three of a kind, two pairs, pair, high card. To simplify the program we will ignore card suits, and face cards. The values that the user inputs will be integer values from LOWEST_NUM to HIGHEST_NUM. (These will be global constants. We'll use LOWEST_NUM = 2 and HIGHEST_NUM = 9, but your program must work if these are set to something different.) When your program runs it should start by collecting HAND_SIZE integer values from the user and placing the integers into an array that has HAND_SIZE elements. It might look like this: Enter 5 numeric cards, no face cards. Use 2 - 9. Card 1: 8 Card 2:…Write a C++ program to create C++ program on SNAKE AND LADDER GAME is a simple text base game.We have used procedure oriented method to design this game. This program is without grahics to keep program simple for beginners. Two players can play this game and the player who cross 100 first is the winner. In this project, used programming concept like switch..case, call by reference, library function like randomize(), random() etc.
- Write a program in C language that implements a simple hand calculator. The followings arithmetic functions are available on the calculator: addition, subtraction, multiplication, division, cosine, sine and tangent. The result of the function must have the same number of digits of precision as the highest precision operand of the function. An example of the program behavior is shown below. > 8.91 + 1 = 9.91 > 9.61*3.11 = 29.8871 > cos(3.14152759) = 0.99849715write a program in C++ that A user needs to determine the size of squares (let say delta) in a grid, the center of the circle (does not have to lie on a grid but it can!) and the radius. (for example use "cin>>" ) Then you need to plot a circle using parametric equations of circle (you need to increase angle and plot these (in my picture black) points). First plot the first point of the circle and determine in which square of grid it is. (in my picture it is an orange square) and plot the left bottom vertex of this square (in my picture it is a blue point). Then increase an angle and plot next point of circle - check if it lies in different square. -If it is not in different square, you need to increase angle and check again. (because an angle was too small) -If it is the different square, then check, if this square has THE COMMON EDGE with the previous one -> if it has the common edge, then print new left bottom vertex of this square (if does not have common edge,…In C++. The New York Times newspaper has published “best seller” lists since 1942. Book sales are tracked nationwide, leading to a list of those books which have recently sold the most copies. You will design, implement and test a C++ program which allows the user to search a subset of the books which have appeared in the New York Times best seller lists. For simplicity, the data set will only contain those books which have reached #1 on either of two lists (fiction and nonfiction) since 1942. The file included named bestsellers.txt contains the complete data set. Each line of the file contains the information for a separate book, which includes: title, author, publisher, date it first reached #1 on one of the best seller lists, and category (fiction or nonfiction). There is a tab character ('\t') between fields.Add a BestSellers class that contains a single attribute of a vector of Book objects, an addBook method that receives a Book object and adds it to the vector, and a display…
- Write a c++ program that reads a list of enrollments from a file and prints a class roster for the teacher. Make the class roster lineup as neatly as you can and still fit on the screen.You can choose the actual values to use for your data. Make sure to do enough sets of data to well test your program!(Empty data set, normal data set, data with large values, data with short values, etc.)Also, your program can't know ahead of time how many people are enrolled in the class...Don't forget to read the file's name from the user and protect your program against any errors that may occur during theopening of the file.Try to use functions to break up the program into more manageable pieces.As an example, you might have the data file contain:# name# student number# address1# address2# phone number# majorJason James100400299400 Maple DrWestfalia, HI 66554555/555-1122Computer ScienceFaruk Ahmed1112223331200 West Jones AveSlimsville, PQ 22221332-4546Medeaval French PoetrySean…write a c++ code using stack,linked list. In quiz game, questions are chosen in such a a way that they cover all fields of a typical quiz contest. The user’s general knowledge is tested with quiz questions regarding science, technology, movies, sports, general health, geography and many more. Quiz Game Project Introduction: Functions of projects and below is some function used in project:- Edit score--adds the prize won to the previous one upon giving the right answer to a question Help-- menu with game summary and rules Show record--shows the highest cash prize won by a particular user Show score--to view the highest score Reset score--to reset the highest score/ default In quiz game project, we can store the user’s name, view the highest score secured by a user, and even reset the score. The game ends when the user’s cash prize piles up to 1000 RS. For each question there are 4 options A, B, C and D and no negative markings. so, money would not be…Please Answer in C++ language only Today the chef decided to cook some tasty dishes from the ingredients in his kitchen. There is an NN of components, represented by the strings S1,S2, .... SN. The chef took all the ingredients, put them in a cauldron and mixed them. In the cauldron, the letters of the strings representing the ingredients are completely shuffled, so that each letter appears in the cauldron as many times as it has appeared in all the strings combined; now the cook can take out one letter from the cauldron at will (if that letter appears in the cauldron more than once, it can be taken out that many times) and use it in a dish. Complete Food is a "chef" chain. Help the chef find the maximum number of complete meals he can make! Input 1 5 codechef chefcode fehcedoc cceeohfd codechef Output 5
- Please do it in c++ as soon as possible. Skip if you don't know. Little Johnny Bubbles appreciates going through hours before his PC playing computer games. His #1 game is Bubble Strike, speedy air pocket shooting internet game for two players. Each game is set in one of the N maps, each having diverse landscape setup. First period of each game settles on which map the game will be played. The game framework arbitrarily chooses three guides and shows them to the players. Every player should pick one of those three guides to be disposed of. The game framework then, at that point, arbitrarily chooses one of the guides that were not picked by any of the players and starts the game. Johnny is profoundly energetic with regards to the game and needs to invest some energy concentrating on maps, in this manner expanding opportunities to dominate matches played on those guides. Nonetheless, he likewise needs to get his work done, so he doesn't have the opportunity to concentrate on every…Write a program in c++ to generate a solution to the Sudoku game using the local search for CSP. The objective is to fill a 9×9 grid with digits so that each column, each row, and each of the nine 3×3 sub-grids that compose the grid contain all of the digits from 1 to 9. Your program should print the output like the following example: Use the operation of swapping two random numbers to be your action of generating a child for the current node. Your program should start by generating a random 9x9 square (note that each number should appear 9 times) and then start improving on this state until reaching a goal by the guidance of the fitness function. If your code doesn’t reach a solution after 10 seconds then print out the reached state anyway.This is in C++. Define a generic function called CheckOrder() that checks if four items are in ascending, neither, or descending order. The function should return -1 if the items are in ascending order, 0 if the items are unordered, and 1 if the items are in descending order. The program reads four items from input and outputs if the items are ordered. The items can be different types, including integers, strings, characters, or doubles. Example input bat hat mat sat 63.2 96.5 100.1 123.5 Ex output Order: -1 Order: -1 main.cpp #include <string>#include <iostream> using namespace std; // TODO: Define a generic method called CheckOrder() that// takes in four variables of generic type as arguments.// The return type of the method is integer // Check the order of the input: return -1 for ascending,// 0 for neither, 1 for descending int main(int argc, char* argv[]) {// Read in four stringsstring stringArg1, stringArg2, stringArg3, stringArg4;cin >> stringArg1;cin…