C package program
Q: Write a C# program that prints a table with a list of at least 5 students together with their grades…
A: Please find the answer below :
Q: Exercise : Write a C++ program that computes and returns: • the smallest positive integer (n) for…
A: Program Approach: Including a necessary header file Defining method compute Declare variable 0 to n…
Q: Write a program in C++ to handle the following scenario: Hungry Pizza has following price list for…
A: CODE:- #include <iostream>#include<bits/stdc++.h>using namespace std; int main(){…
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 a C program that accepts a number and detemines whether the number is positive, negative or a…
A: 1. Taking a variable num to store the number entered by the user. 2. Asking the user to enter the…
Q: Write a C++ program that will simulate a Point-of-Sales terminal in Snack Bar. For example,these…
A: Begin Enter values of items in a variable Set default value of quantity of all the items=0 Take user…
Q: Write a C++ program that will allow the user to input the First Name, Last name, Middle Initial, and…
A: Introduction: Here we are asked to create a program in C++ program that will allow the user to…
Q: Write a complete C++ program that asks the user for a number of gallons and then outputs the…
A: Write a complete C++ program that asks the user for a number of gallons and then outputs the…
Q: Write a C++ program that accepts a number followed by one space and then a letter. If the letter…
A: Approach: We used if else-if ladder to display the required result Prompt user to enter the number…
Q: Write a c program that calculates a degree classification such that number of modules used for the…
A: ALGORITHM:- 1. Take input for the marks of 10 subjects from user. 2. Calculate the total of all the…
Q: Write a C++ program that read a line of text from the user. The program will replace all four-letter…
A: Here have to determine about c++ code for code of replacing 4 letters words in string.
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 program in C++ to the value of Z? r2+2r-ln r V3+r-10 if r>0 Z= if x <0 if x = 0 Cosr + 2 r+…
A: Start Accept r value from the user Based on r value find Z print Z value on console Stop
Q: Write a function in Java that implements the following logic: We are having a party with amounts of…
A: As per the requirement code is written. Algorithm: Step 1: Write the main() method Step 2: Take the…
Q: Write a C++ program that calculates the due amount for a cellular telephone bill. The cell company…
A: Here is the c++ code: See below step for code:
Q: Write a c++ program that plays a game with a single die (or dice). Each number on the die is…
A: function main: Start declare dice, sum =0 declare user_choice do for i = 1 to 5 folow step 6…
Q: Write a C program that reads in the mass of two bodies and the distance between them and then…
A: Using const keyword, we can declare a constant. Here we are dealing with decimal values and as…
Q: Write a C program to simulate tossing a “fair” coin. Allow the user to enter the number of tosses.…
A: Generate random number and divide with 2 If remainder is 0, consider it as HEADS or else TAILS
Q: Write a program using c++that plays a dice game called "21" It is a variation on BlackJack where…
A: I will implement the above game with the help of rand() function in c++ to get a random number…
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 program OrderCheck.java that takes four int command-line arguments w, x, y, and z. Define a…
A: Code Screenshot :
Q: Write a C program that takes x-y coordinates of a point in the Cartesian plane and prints a message…
A: Solution Explanation: First I asked for the user to give values for x,y printf("Please enter x, y…
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++ for determining if a year is a leap year. In the Gregorian calendar system…
A: Coded using C++.
Q: Write a program in the C++ language to receive student information from the second stage as follows…
A: - We have to code the scorecard problem. - We are using C++ here.
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 C++ program that would implement the function called romanToInt which returns the integer…
A: - We have to code for the conversion problem.
Q: Write a program in the C++ language to receive student information from the second stage as follows…
A: Find the code attached.
Q: Q.1/Write a program in C++ language that introduces the salaries of ten teachers in five departments…
A: Use a 2-D array to store salaries of 10 teachers of 5 departments
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 reads a sentence into a c-string of maximum 80 characters, a character into…
A: In this programming question we have to develop a code, using C++ program in which we ask User For…
Q: write a program in C++ using if-else or switch for calculating electricity bill, the range of the…
A: GIVEN: write a program in C++ using if-else or switch for calculating electricity bill, the range…
Q: Write a program c++ that receives from the user a point on the X level - y, then prints whether the…
A: Code: // CPP program to check quadrant#include <bits/stdc++.h>using namespace std; // Function…
Q: write a c program Count Dracula buys blood from the public. But since he prefers certain types to…
A: Given The answer is given below.
Q: Write a Python program for ....Mr Ramkumar has divided his property into 3 parts in the ratio of…
A: Python program to divide the property into 3 parts. The property division ratio is 13:12:11 The…
Q: c++ to store the roll no. (starting from 1), name and age of 5 students and then print the details…
A: Create a class studnt with private roll_no, name and age variables. Declare a get() method to get…
Q: Write a C++ program that would implement the function called roman Tolnt which returns the integer…
A: #include <iostream>using namespace std;// convert character equivalent of integer in romanint…
Q: Write a C program for a match-stick game between the computer and a user. Your program should ensure…
A:
Q: Write a C program that requires a user to input weight and height so that it can calculate weight to…
A: Given: Write a C program that requires a user to input weight and height so that it can calculate…
Q: Write a C program: In a class of n students print the total no. of female students and total no. of…
A: Code: #include <stdio.h>int main(){ //declaring required variables int n1,n2,total;…
Q: Write a complete C++ program that prints the change in population of the the United States: p = p +…
A: #include <iostream> #include <iomanip> using namespace std; int main() { int year =…
Q: Write a C++ program that calculates the due amount for a cellular telephone bill. The cell company…
A: Below I have provided C++ Programming. Also, I have attached the screenshot of the code and output…
Q: Write a C# program using a switch statement that switches on the variable name. If the name is…
A: HI THEREI AM ADDING C# CODE AS PER REQUIREMENT BELOWPLEASE GO THROUGH ITTHANK YOU
Q: Write a program in C++ to handle the following scenario: Following is a list of tablets available in…
A: We will be developing a C++ program to handle the following scenario of the medicine store
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 to find the gross salary of an employee after taking basic salary, HRA, DA from…
A: Start Take the input of basic salary Compute the gross salary Print gross salary Stop
Q: Write a C++ Program for a perfect voting system for the country. If a voter votes for PPP a message…
A: Program code: //include the header files#include <iostream>using namespace std;//define the…
Write a C package
Step by step
Solved in 4 steps with 5 images
- Write a C program that input a single letter and prints out the corresponding digits on the phone. The letters and digits on a phone are grouped following way. 2 = ABC 3 = DEF 4 = GHI 5 = JKL 6 = MNO 7 = PRS 8 = TUV 9 = WXY No digits corresponds to Q and Z. For these two letters, your program should prints a message indicating that they are not used on a phone.Write a program using c++that plays a dice game called "21" It is a variation on BlackJack where one player plays against the computer trying to get as close to 21 as possible without going over. Here are the rules of the game: You will play with dice that have numbers from 1 to 11. To win, the player or the computer has to get to 21, or as close as possible without going over. If the player or computer goes over 21, they instantly lose. If there is a tie, the computer wins. Starting the game: The player is asked to give the computer a name. For now, we'll simply call the computer opponent, "computer." The game starts with rolling four dice. The first two dice are for the player. These two dice are added up and the total outputted to the screen. The other two dice are for the computer. Likewise, their total is outputted to the screen. Player Loop: If a total of 21 has been reached by either the player or the computer, the game instantly stops and the winner is…Write a c++ program for a bank in your town that updates its customers’ accounts at the end of each month. The bank offers two types of accounts:savings and cheque. Every customer must maintain a minimum balance.Minimum balances for the accounts are: Savings : R 1000.00 Cheque: R 1500.00If a customer’s balance falls below the minimum balance, there is a service charge of R50.00 for savings accounts andR100.00 for cheque accounts. If the balance at the end of the month is at least the minimum balance, the clientreceives interest as follows: Savings accounts receive 4% interest on the balance. Cheque accounts with balances of up to R 5000.00 more than the minimum balance receive 3% interest;otherwise, accounts with balances more than R 5000.00 more than the minimum balance receive 5% interest.Write a c++ program that requests the user to enter a customer’s account number (int type), account type (char type - S for savings, C for checking) and current balance. The updated balance must…
- write a program in C++ using if-else or switch for calculating electricity bill, the range of the unit consumption price is given below. 1) 1 to 100 units then the per-unit price is multiplied by 5. 2) 101 to 200 then the per-unit price is multiplied by 7. 3) 201 to 350 then per unit price for this range is multiply by 10. 4) 350 to 999 and above then the per-unit price will multiply by 12. 5) 1000 and above give 5 percent discount. suppose a consumer consumes 360 units then the total bill calculation will be like this. 5*100=500 7*100=700 10*150=1500 12*10=120 Total units 360 and total bill is equal to = 500+700+1500+120=2820.Write a program in C++ that takes in a line of text as input, and outputs that line of text in reverse. The program repeats, ending when the user enters "Quit", "quit", or "q" for the line of text. Ex: If the input is: Hello there Hey quit then the output is: ereht olleH yeHwrite a c program Count Dracula buys blood from the public. But since he prefers certain types to others, he pays as follows: Type Rate/liter A P 3000.00 B P 1800.75 C (for AB) P 2880.25 O P 1500.00 Write a C program to input a client’s blood type and the volume (liter) of blood extracted. Output how much the client will be paid.
- Write a C program that calculates and prints the bill for a cellular telephone company. The company offers two types of services: regular and premium, each with varying rates based on usage.The rates are computed as follows:Regular service:- $10.00 base charge with the first 50 minutes being free.- Charges for usage beyond 50 minutes are $0.20 per minute.Premium service:- $25.00 base charge with different rates for day and night usage: a. For calls made from 6:00 a.m. to 6:00 p.m., the first 75 minutes are free, and charges for usage beyond 75 minutes are $0.10 per minute. b. For calls made from 6:00 p.m. to 6:00 a.m., the first 100 minutes are free, and charges for usage beyond 100 minutes are $0.05 per minute.The program should prompt the user to enter an account number, a service code (as a character), and the number of minutes the service was used. A service code of 'r' or 'R' represents regular service, while 'p' or 'P' represents premium service. Any other character should be…Write a C++ program that will simulate a Point-of-Sales terminal in Snack Bar. For example,these are the items available for purchase and their corresponding unit prices: Hot Dog Php 45.50 Hamburger Php 35.75 French Fries Php 25.85 Milk Shake Php 15.75 The terminal will ask the client to enter the quantity per item listed above. If in case, the client don't want to buy a particular product just give 0 on thatitem. The terminal will compute the cost per item and will generate a Transaction Receipt at the end. The terminal will also ask the client how much money to tender in order to pay the cost of the items bought. It will also compute for the VAT (value-added tax) on the total purchase say 20% of the total sales. See sample run output:Write a C/C++ program that asks the user for threeinteger marks. These are the student marks out of25 for class tests.Subsequently the program should ask the user fora big test mark out of 50. The final mark iscalculated with 50% class tests and 50% test mark.Test all values for validity. If a value is invalid, amessage should be displayed, and the user shouldbe repeatedly given chance to correct the input.The program should display the final mark, as wellas the symbol of the student (see Table 1.2).The program should repeat until the user enters“-1” for the first class test.After the user has entered “-1”, the program shoulddisplay a summary of the marks, i.e. the averagefinal mark, highest final mark, and lowest finalmark. The program also displays the number ofstudents that pass (mark>=50), pass withdistinction (mark>=75), and the number of studentsthat fail (mark<50).See Figure 1.2 for example output
- Write a program in C++ to handle the following scenario: Following is a list of tablets available in a medical store. Name Dosage (mg) Price (RS) Quantity Panadol 10 2 50 Panadol 20 3 100 Panadol 30 5 250 Disprin 10 2 350 Disprin 20 3 600 Disprin 30 5 450 Calpol 50 3 520 Calpol 100 6 112 Augmentin 250 30 256 Augmentin 500 50 556 Brufin 250 5 546 Brufin 500 5 523 Display following menu given below. Enter p for Panadol Enter d for Disprin Enter c for Calpol Enter a for Augmentin Enter b for Brufin After a valid input from above menu (Note that above input is not case sensitive user can either input in uppercase or in lowercase). After that, input dosage from user, if dosage is invalid display message “Dosage not available”, if dosage is valid, ask for quantity, quantity must be greater than 0 and…Write a C program that reads the income of a person and calculates his total tax according tothe following conditions: if his income is between 3 lac and 5 lac, then his tax-rate is 5% of hissalary; for the next 5 lac, tax-rate is 6%, for the next 10 lac tax is 7%, afterwards it is 8%.For e.g., if a person’s income is 22 lac, then his total tax = Tk. 0.05 *5 lac + Tk. 0.06 * 5 lac +0.07*10 lac + 0.08 * 2 lac = Tk. 1.41 lac.Write a C++ program to read details of invoices from a file and to output invoices which indicate the total cost of each item and the total cost of the invoice together with full details. Details of an invoice are: An invoice header with number of items on the invoice and the date of the invoice For each item, an item code (6 digits), a name, a quantity and a unit cost. Thus a typical set of lines in the file for invoices might be: 3 2/12/2017 134276 Framis-R 8 7.35 125790 Framis-L 12 15.76 100086 Aglet 395 0.112 1/23/2017 135876 Wrench 12 22.50 543287 Henway 4 19.25 The above indicates that there are three items on the first invoice and its date is 2/12/2017, the first item has an item code of 134276 is a Framis-R an order quantity of 8 and a unit price of $7.35. There are two items on the next invoice, etc. Write a C++ program to read the file (input.txt) with details of invoices and to output to a file an invoice which indicates the total cost of each item and the total…