:Write a program that have three structures .The first structure contains an information of 10 teachers and this information is: the name of the teacher and the subjects he teaches and the name of his department, the second structure contains information of 10 students which includes the name, stage and section and contains an internal structure containing ten degree, average and sum of each student, then print the information of teachers and students with their degrees and average of each student * Your answer
Q: Write a program that declares a structure of 114 employees of a company. Your program should accept…
A: #include<iostream>using namespace std;struct Emp { int id[120]; string fname[120];…
Q: Write a function called increment that accepts a date structure with three fields. The first field…
A: Algorithm: Start Define a struct with string month, int day,int year as its members Read month,…
Q: 1.Write a structure to store the name, account number and balance of customers (more than 10) and…
A: As per Bartleby's guideline: “Since you have posted a question with multiple sub-parts, we will…
Q: Exercise 2: A structure Students is created with the following definition: struct Students { string…
A: #include <iostream>using namespace std; struct student{ char name[50]; char subject[50];…
Q: Write a structure to store the roll no., name, age (between 11 to 14) and address of students (more…
A: Program code: #include <iostream>using namespace std;struct student{ string name; int…
Q: Using typedef, declare a structure Programme that can store the following vehicle details:…
A: As no programming language is mentioned, it is solved using basic C++
Q: Write a structure declaration to hold the following data about a savings account:Account Number (…
A: Given:- Write a structure declaration to hold the following data about a savings account:Account…
Q: 1. Write a full code that will contain all the following measures. Create a structure named…
A: Here I written C code as per problem. I hope you like it.
Q: Write a c program with structures which contains information found in a library’s card catalog. It…
A: program approach include standard files structure for library’s card catalog. It contain : -…
Q: 1.Write a program to store and print the roll no., name , age and marks of a student using…
A: As per Bartleby guidelines: “Since you have posted a question with multiple sub-parts, we will solve…
Q: e necessary declarations for a structure that will hold 10 quiz scores (the number of scores should…
A: Required: Write the necessary declarations for a structure that will hold 10 quiz scores (the number…
Q: Write a program that use a structure called item contains information about 100 different items in a…
A: #note no programming language is mentioned so i was used c++ programming language…
Q: Let EmployeeInfo be the name of a structure for employee information. Which one declares a function…
A: Ans) void showInfo(const EmployeeInfo &emp);
Q: Write a structure to store the name, account number and balance of customers (more than 10) and…
A: We use c++ to execute this program C++ used for : C++ (or "C-plus-plus") is a general-purpose…
Q: program in c++ Enter the marks of 5 students in Chemistry, Mathematics and Physics (each out of 100)…
A: #include<bits/stdc++.h>//header file using namespace std;struct Student // here i was created…
Q: Q1:Write a program that have three structures .The first structure contains an information of 10…
A: //note no programming language is mentioned so i was used c++ programing language…
Q: Write a structure to store the names, salary and hours of workper day of 10 employees in a company.…
A: Introduction: In C/C++, a structure is a key word that defines a user-defined data type. A structure…
Q: Write a program that uses two structures Name and Student to store the following information for…
A: Create a nameType structure that consists of First Name, Middle Initial, and Last Name struct…
Q: A Point in a plane can be represented by its two coordinates, x and y. Therefore, we can represent a…
A: Actually, program is a executable software that runs on a computer.
Q: C++ OOP PART 1: A phone number, such as (212) 767-8900, can be thought of as having three parts: the…
A: OUTPUT AND CODING
Q: 6. Write a structure declaration to hold the following data about a savin account. Give structure…
A: this question is asking to declare a structure variable using following data
Q: Suppose you are cataloging products in a departmental shop. Declare a structure product with…
A: The structure is a new data type which is consists of the existing primitive data types like…
Q: QUESTION 3 a) A structure name called Phone is declared as following: struct Phone string model;…
A: Note: This is a multiple-question-based problem. As per company guidelines, only the first question…
Q: 1. Write a program that declare a simple structure, declare at least two variables with different…
A: Sample Response: //Java program that declare a simple structure with atleast two variablespackage…
Q: Q1) write a program that use structure about student. The structure contains information about 200…
A: Answer : #include<iostream>#define N 200using namespace std; struct student{ string name;…
Q: A structure will be defined (Student ID, Student Name, Student Surname, Midterm, Final, average).…
A: for (int i = 0; i < 10; i++) { printf("\nEnter midterm grade for %s %s with id %d:…
Q: Write a structure to store the name, account number, and balance of customers (more than 10) and…
A: Program approach:- Header file. Using namespace function. Defining the structure for the customer.…
Q: Write a program that uses a structure named MovieData to store the following information about a…
A: Structure is a keyword for creating user-defined data types in C/C++. Structures create data types…
Q: From structure Date as declared in code given below, define TWO (2) variables called regDate and…
A: a structure is a user defined data type which can store heterogeneous type of data . structure…
Q: C++ Program: Enter the marks of 5 students in Chemistry, Mathematics, and Physics (each out of 100)…
A: Given: C++ Program: Enter the marks of 5 students in Chemistry, Mathematics, and Physics (each out…
Q: 4. In a building, there are 8 apartments. Each apartment has electricity, water, and gas expenses.…
A: Note: The programming language is not mentioned in the question so C++ programming language is used…
Q: Write a program Declare a data structure marks_t, which contains the following type int members: …
A: Required: Write a program Declare a data structure marks_t, which contains the following type int…
Q: Write a structure declaration named Measurement, with the following members: miles, an integer…
A: The structure Measurement is having two fields one to store miles and other to store meters
Q: Write a program that takes the name, age, city as an input and then displays the data from the…
A: Program description: e is the name of the structure employee. The structure employee stores 3 pieces…
Q: write a program to create a structure for student have these fields , name, age , address , three…
A: logic:- create a structure having fields name, age, address, an array of marks to store 3 values…
Q: The Manhattan distance between two points P(x1,y1) and Q(x2,y2) is defined as follows: M.D. =…
A: Given: The Manhattan distance between two points P(x1,y1) and Q(x2,y2) is defined as follows:M.D. =…
Q: write a program in which Create a structure called time. Its three members, all type int, should be…
A: Introduction of Program: In this program, the User will enter hours, minutes, and seconds then the…
Q: Write a program to add two complex numbers using structure. Create a structure called Complex with…
A: Sample Response: //C++ program to add two complex numbers#include <iostream>using namespace…
Q: A car showroom wants to put cars on exhibition. The cars are to be displayed pricewise to the…
A: Structure created using c Program #include <stdio.h>#include <conio.h>void main() {…
Q: Write a C++ program that takes car information, compares the car prices, and displays the car…
A: logic:- declare a structure name Car with data members model, price and cc of data type char, float…
Q: Write a structure to store the name, account number and balance of customers (more than 10) and…
A: Program: #include <iostream> #include <cstring> #include <cmath> using namespace…
Q: Suppose you have to store the record of 30 doctors at the hospital and display their record when…
A: #include <iostream>using namespace std; struct birthdate{ int day; int month; int…
Q: Write a program that illustrates how to
A: /*Write a program that illustrates how to store information about patients in a hospital, access and…
Q: H.W.3 (due after one week) Write a program with structures which contains information found in a…
A: Note: Below is the required C program. Program Approach: Defining necessary header files Declaring…
Q: Enter the marks of 5 students in Programming Fundamentals, ICT and Object-Oriented Programming (each…
A: C++ code: #include<string>#include<iostream>using namespace std; //creating structure…
Q: Write a structure to store the names, salary and hours of work per day of 10 employees in a company.…
A: Read the name, salary, hours for every Employee and based on hours update the salary accordingly
Q: A government want to store information of voting of candidates in particular area. Write program of…
A: Use Vote as Structure to represent all information Use Candidate Structure to represent the nested…
Q: Declare a structure CAR consisting of a model id, model name, number of cars in that model, and the…
A: #include <stdio.h>#include <conio.h>int updateprice();void main() { struct car {…
Q: Write a structure to store the roll no., name, age (between 17 and 20) and address of students.…
A: “Since you have asked multiple question, we will solve the first question for you. If you want any…
Q: Write a program which stores time information in a structure. The time structure should store the…
A: Actually, program is a executable software that runs on a computer.
Step by step
Solved in 3 steps with 1 images
- (Conversion) a. Write a C++ program to convert meters to feet. The program should request the starting meter value, the number of conversions to be made, and the increment between metric values. The display should have appropriate headings and list the meters and the corresponding feet value. If the number of iterations is greater than 10, have your program substitute a default increment of 10. Use the relationship that 1 meter = 3.281 feet. b. Run the program written in Exercise 6a on a computer. Verify that your program begins at the correct starting meter value and contains the exact number of conversions specified in your input data. c. Modify the program written in Exercise 6a to request the starting meter value, the ending meter value, and the increment. Instead of the condition checking for a fixed count, the condition checks for the ending meter value. If the number of iterations is greater than 20, have your program substitute a default increment of (ending value - starting value) / 19.3. Write a code for craps game. Craps is a dice game in which the players make wagers on the outcome of the roll, or a series of rolls, of a pair of dice.The rules of the dice game craps are as follows:You roll two dice. Each die has six faces, which contain one, two, three, four, five and six spots, respectively. After the dice have come to rest, the sum of the spots on the two upward faces is calculated. If the sum is 7 or 11 on the first throw, you win and play is over. If the sum is 2, 3 or 12 on the first throw you lose and play is over. If the sum is 4, 5, 6, 8, 9 or 10 on the first throw, that sum becomes your “point.” To win, you must continue rolling the dice until you “make your point” (i.e., roll that same point value). You lose by rolling a 7 before making your point. 4. Write a program which prompts the user for their age. If they are 19 or younger inform them that qualify for student discounts. If they are between 20 and 65 inform them that they qualify for no age…Code using c++ 3. From Person to People by CodeChum Admin Now that we have created a Person, it's time to create more Person and this tech universe shall be filled with people! Instructions: In the code editor, you are provided with the definition of a struct Person. This struct needs an integer value for its age and character value for its gender. Furthermore, you are provided with a displayPerson() function which accepts a struct Person as its parameter. In the main() function, there's a pre-created array of 5 Persons. Your task is to ask the user for the values of the age and gender of these Persons. Then, once you've set their ages and genders, call the displayPerson() function and pass them one by one. Input 1. A series of ages and genders of the 5 Persons Output Person·#1 Enter·Person's·age:·24 Enter·Person's·gender:·M Person·#2 Enter·Person's·age:·21 Enter·Person's·gender:·F Person·#3 Enter·Person's·age:·22 Enter·Person's·gender:·F Person·#4…
- In C++, write a program that calculates and prints a monthly paycheck for an employee. The net pay is calculated after taking the following deductions from the employee's gross salary: Federal Income Tax: 17.5% State Tax: 9.1% Social Security Tax: 6.2% Medicare Tax: 1.45% Retirement Plan: 9.29% Health Insurance: $51.48 Life Insurance: $3.71 Your program will prompt the user to input the employee ID, the employee name, and the employee's monthly gross salary. The program will calculate the deductions listed above, along with the percentage of take home pay (defined as the net pay divided by the gross salary). After calculating each deduction and percentage, the output will be printed to the screen (see example output below). Requirements All decimal numbers must be formatted to 2 decimal places. Ask for the employee's ID first, then full name (can include spaces), then the salary. The prompt to enter the salary must include the employee name. The employee ID MUST be…Question 1 is already done need help with the others though This is the C code I have so far #include <stdio.h> #include <stdlib.h> struct employees { char name[20]; int ssn[9]; int yearBorn, salary; }; struct employees **emps = new employees()[10]; //Added new statement ---- bartleby // function to read the employee data from the user void readEmployee(struct employees *emp) { printf("Enter name: "); gets(emp->name); printf("Enter ssn: "); for(int i =0; i <9; i++) scanf("%d", &emp->ssn[i]); printf("Enter birth year: "); scanf("%d", &emp->yearBorn); printf("Enter salary: "); scanf("%d", &emp->salary); } // function to create a pointer of employee type struct employees *createEmployee() { // creating the pointer struct employees *emp = malloc(sizeof(struct employees)); // function to read the data readEmployee(emp); // returning the data return emp; } // function to…1.Write a program in C++ , to count the number of people in each of the following age groups: 0-16 (16 included) infant, 16-29 young, 29-55 middle aged, 55-75 old, 75 - and older, really old ( intervals closed to the left, open to the right).Report the number of people in each age group. explain how the code works
- 10. Let p be the statement “He gets frustrated.” and q be the statement “He will be able to complete the job.” Translate ~(p ∧ q) into the equivalent statement.Help Me With C Programming. At Lili's birthday party, there is a game arranged by Jojo as the host. The game is handing out a number of Y candies to a number of X people where all the sweets taste sweet except for the last one candy that tastes like rotten beans. The distribution of sweets will be sequential starting from position Z and if it passes the last position then the distribution of candy continues to the first position. Write down the person in the position of who will get the last candy. Format Input The first line of input is T, which is the number of test cases. The second row and the next number of T lines are X, Y, Z. X is the number of people who will be handed out candy. Y is the number of candies available. Z is the initial position of the person who will be handed out the candy. Format Output A string of "Case #N: " and a number that is the position of the person who got the last candy [Look at Image] In the sample above, for example, which is inputted in the…USING C A catalog listing for a textbook consists of the authors’ names, the title, the publisher, and the year ofpublication. Declare a structure type catalog_entry_t and a variable book , and write statements thatstore the relevant data for this textbook in book . I have this code so far but not sure where to go from here #include<stdio.h>#include<string.h> typedef struct{char author_name[50], title[50], publisher[50];int publication;} catalog_entry_t;catalog_entry_t book; strcpy(book.author_name,"Rhett Beeson");strcpy(book.title,"This class is hard");strcpy(book.publisher,"TTU");book.publication=2021
- / Write a function that takes 2 arguments, both strings. // It returns as a number how many times the second string occurs within the first string. const subStringCount = (string, subString) => { } / /Examples subStringCount("mississippi", "i") // returns 4 subStringCount("lions and tigers and bears", "and") // returns 2 Exercise 2 // ---------------------------------------------------------------- // Write a function that takes 3 arguments, all integers. // It returns an array starting with the first number and increasing by the interval until it reaches // the second number, including the second number if it is part of the pattern. // For this exercise you can assume that the first integer is strictly less than the second integer. const countWithIntervals = (start, end, interval) => { } / / Examples countWithIntervals(1, 10, 2) // returns [1, 3, 5, 7, 9] countWithIntervals(5, 20, 3) // returns [5, 8, 11, 14, 17, 20] // Write a function that takes 1 argument, a…Question 3 Write a program in C, which simulates the game of connect 4, representing the board with coloured tiles, by means of matrices, where the player can choose whether to play with the computer and the computer represents player 2 or with another person, where at the end it shows the winner, the loser or if there was a draw. . Full explain this question very fast solution sent me2.1 A cake company wants to represent the logic of a program that allows the user to enter the three values. The first value represents hourly pay rate, the second value represents the number of hours worked on pay day (25 days per month) and the third represents the percentage of gross salary withheld. The program multiplies the hourly pay rate by the number of hours, giving the gross pay then it multiplies the gross pay by the withholding percentage, giving the withholding amount. Finally, it subtracts the withholding amount from the gross pay, giving the net pay after taxes. The program prints the net pay. 2.1.1 Draw a hierarchical diagram. 2.1.2 Draw the flowchart for this program. 2.1.3 Develop a pseudocode for this program.