There are six runners in the 100-yard dash. How many ways are there for three medals gold, silver and bronze to be awarded if ties are possible
Q: C++ Program to Find All Roots of a Quadratic Equation
A: Sample Response: //C++ program to find all roots of a quadratic equation#include…
Q: .In an ancient land, the beautiful princess Eve had many suitors. She decided on the following…
A: C++ is a general purpose, modern and object oriented programming language. The given question is…
Q: Locate a Letter Write a program that requests a letter, converts it to uppercase, and gives its…
A: Visual Basic is an object-oriented programming language developed by Microsoft. Using Visual Basic…
Q: Supposed a ball is thrown straight up in the air with an initial velocity of 50 feet per second and…
A: Algorithm: 1. Start 2. Declare h0,vo,t,height 3. Initialize h0,v0,t 4. Compute…
Q: Convert Months Write a program that allows the user to enter a whole number of monthsand then…
A: As no language was mentioned in the question, so I have done this using C++. Here I have taken…
Q: Growth of an Investment Suppose a fixed amount of money is deposited at the beginning of each month…
A: Algorithm: Start Read amount Q in a textbox Initialize prev to Q and amount to Q Declare a string…
Q: TASK: Draw the Flow Chart. Construct C++ program. QUESTION 1 Dr. Siti would like to calculate her…
A: GIVEN: Based on the values of the total body fat and weight, calculate the BF% The value of BF% is…
Q: coding in C++ Tic Tac Toe game that will match a player against the computer. Do's: Use a typical…
A: Program Approach: Include necessary libraries <iostream> Now create a 2 D array of 3 *3 size.…
Q: ( MindTap - Cenage )Example 5-6 implements the Number Guessing Game program. If the guessed number…
A: The given program in C++ performs the below tasks: Generates a random number between 0 to 100 and…
Q: C++ Program /** * Problem 1: Simple Selection * * You have a red lottery ticket showing ints a, b,…
A: #include <iostream> using namespace std;//function definition int redTicket(int a, int b, int…
Q: C++ Demonstration #2: Write a program segment that will asks for a grade from the user. Display ‘A’…
A: * Program Explanation :- First create variable for marks and give name ms. Take the value form the…
Q: Lecture Activity 4.3: Flowcharting (Selection Structure) Given is GROSS_PAY. Draw a flowchart that…
A: Please upvote/like. I am providing you the correct answer below.
Q: Discrete Structures Using proof by cases, prove that if x is a real number then |x - 1| + |x + 5|…
A: ∣x−1∣+∣x+5∣=6. f(x)=∣x−1∣+∣x+5∣…
Q: Write VB program to classify students according to their high school average. The students with…
A: Given that Write VB program to classify students according to their high schoolaverage. The students…
Q: Income Tax The original U.S. income tax of 1913 was quite simple. The tax was: ● 1 percent on the…
A: Program : income=float(input("Enter salary: ")) if(income<=50000):…
Q: Data Example: Problem 2: (Hint: Use a sequential structure) How do you calculate the price you would…
A: Note: As you have not mentioned any programming language, the program is written in the JAVA…
Q: C. C. Driver Class 1. Prompt the user to enter the information about his "Lunch". First ask the user…
A: Solution:We need to get input from the user for the name of the item, weight, calories for all the…
Q: gle and the three circles. Assume that there is an equilateral triangle = 1 2*a and there are three…
A: Given:
Q: a C program that calculates the greatest common divisor of two
A: C program that calculates the greatest common divisor of two,implementthe Euclid algorithm
Q: ogramming problem Consider data points (xị, Y;), i = 0,..., n. We would like to interpolate them…
A: Newton's interpolation method.
Q: 3. 3 Complete the sentences with one of these adverbs. still nearly only of course together
A: Answer : 1. Bill and I work together . We've been in the same office for four years. 2. I…
Q: Rolling Two Dice Write a program that simulates the rolling of two dice. The program should use rand…
A: Note: Programming language is missing in the question. So we will answer this program in C++…
Q: Assume that sentence is a variable of type String that has been assigned a value. Assume furthermore…
A: Step 1 : declare two variable sentence and firstWord Step 2 : create Scanner class object sc Step 3…
Q: provide evidence that randomly assigning workdays and locations is a suboptimal strategy
A: Solution 1) The data is being collected over 20 weeks which means 5 months. Hence there should be…
Q: INTRODUCTION: The apparent temperature outside is related to both the temperature and wind speed The…
A: I have implemented the given requirements in C language. The code is as follows: #include…
Q: Tic Tac Toe game that will match a player against the computer. Do's: Use a typical 3 x 3 board.…
A: Program code: #include <iostream> // including necessary libraries #include <string>//…
Q: ACTIVITY 1.2: Equivalent grade of the student Write an algorithm and draw a flowchart that will read…
A: Algorithm: set student =2 For i=1 to student Input grade[i] For i=1 to student For each grades…
Q: Question2: Write a program to determine a student's final grade for (Structure, Strength of…
A: Answer :
Q: Give two examples of lexical errors in a program, using the language of your choice.
A: #include <stdio.h> int main(int argc, char const *argv[]) { int…
Q: (C PROGRAMMING ONLY) 5. Making a Kid From Two Persons by CodeChum Admin `The population is slowly…
A: #include <stdio.h> typedef struct{ int age; char gender;}Person; void…
Q: 3.11 LAB: Input and formatted output: Caffeine levels A half-life is the amount of time it takes for…
A: Given:
Q: Exercise 1: A user-friendly program should print an introduction that tells the user what the…
A: the answer is given below:-
Q: C++ Summary When you borrow money to buy a house, a car, or for some other purpose, you repay…
A: In this program, you need to take 3 input values from user for loan amount, interest rate and…
Q: switch-case statement should be used for the ff. exercises: 1. Write a program that would accept a…
A: #include <iostream> using namespace std; int main() { int radius; char ch; float pi =…
Q: b. Table 1 shows classification of blood pressure based on the systolic blood pressure (SBP) and…
A: Algorithm: Start Read sbp and dbp if sbp<120 and dbp<80, then print Blood Pressure Category…
Q: Revise Exercise 6.28 (Craps is a popular dice game played in casinos. Write a program to play a…
A: #Always specify which language we have to #solve and it is solved in python import…
Q: PYTHON CODING A retail company assigns a $5000 store bonus if monthly sales are more than…
A: First create the function for the store bonus which will take the current sales as the input and…
Q: The original U.S. income tax of 1913 was quite simple. The tax was: ● 1 percent on the first…
A: We will follow this approach: 1. Start 2. Input total 3. IF total <= 50000 tax =…
Q: story problem that addresses average velocity and acceleration
A: here have to determine about addresses average velocity and acceleration.
Q: Give two examples of semantic errors in a program, using the language of your choice.
A: Semantics: The relationship between the computational model and the sense of the program is…
Q: Problem Description: Standard telephone keypads contain the digits zero through nine. The numbers…
A: Write a program that, given a seven-digit number, uses a PrintStream object to write to a file every…
Q: Q1: In the example 3 change the program to summation (collect) the value of (nl, n2, n3 and n4)…
A: By sending n1,n2,n3,n4 attributes to a function and returning the summation we can solve this…
Q: ++ In recording scores for a golf tournament, we enter the name and score of the player as the…
A: Create a Application performing the following task:- Add new Player ( it should insert values in…
Q: A complete scientific name... * a. Is written in italics and the first letter in the first word…
A:
Q: Program #1 15 points Write a C++ program that determines a student's grade. The program will read…
A: Code #include<iostream>#include<conio.h>#include<string.h>using namespace std;void…
Q: Do the programming exercises on page 54-55 Exercise 1: A user-friendly program should print an…
A:
DISCRETE STRUCTURE
a)There are six runners in the 100-yard dash. How many ways are there for three medals
gold, silver and bronze to be awarded if ties are possible.
Step by step
Solved in 3 steps with 3 images
- Single Lane Highway Problem Description Certain number of cars are passing a single lane road. Speeds of all cars vary. It is easy to see, that depending on the speeds of the cars various groups will be formed. Being a single lane road passing/overtaking is not allowed. Given speeds of cars, calculate how many groups can be formed if all possible permutations are taken into account. Refer example1 for better understanding. Print number of groups divided by the number of permutations. Constraints 0 <= N < 10 ^ 5 0 <= speed of individual vehicle < 10 ^ 9 Input First line contains an integer N, which denotes the number of vehicles Second line contains N space separated integers which denotes the speed of individual vehicle. Output Print number of groups divided by the number of permutations rounded upto 6 decimal places. Time Limit 1 Examples Example 1 Input 3 10 20 30 Output 1.833333 Explanation: So all possible permutations are: {10 20 30} {10 30 20} {20} {10 30} {20 30}…(Heat transfer) The formula developed in Exercise 5 can be used to determine the cooling time, t, caused only by radiation, of each planet in the solar system. For convenience, this formula is repeated here (see Exercise 5 for a definition of each symbol): t=Nk2eAT3fin A=surfaceareaofasphere=4r2 N=numberofatoms=volumeofthespherevolumeofanatom Volume of a sphere sphere=43radius3 The volume of a single atom is approximately 11029m3 . Using this information and the current temperatures and radii listed in the following chart, determine the time it took each planet to cool to its current temperature, caused only by radiation.Subject / Operation Research You need to visit a city you have never been to before and you want to reach that city by the shortest route. That's why you work on the map to determine the shortest path. Depending on the route you choose, you have to pass through different cities (cities that can be passed: A, B, C, D, E). Table 3 shows the distance (kilometers) between adjacent cities. Answer the following questions regarding this shortest path problem. a)Create the network representation b) Write the mathematical model. c) Solve with Dijkstra's algorithm.
- Sequential Money Problem (Coin Row)• Suppose there are n coins lined up side by side on a table; Let the values of these coins be c₁, c₂, ..., cn (the valuesthey do not have to be different from each other, there may be more than one coin of the same value on the table; but all positive).• The goal is not to take two adjacent coins on the table side by side.collecting the largest total valuable coins from the table, provided that The algorithm that solves the Ordered Money problem;a. By using the brute-force method, evaluating all possible valid alternatives and reaching the result (with the "exhaustive search" method),b. Write the "recurrence" equation that describes the problem directly (without using the dynamic programming technique). Describe the time complexity of each of your algorithms for both of the above spelling.Celebrity problem A celebrity among a group of n people is a person who knows nobody but is known by everybody else. The task is to identify a celebrity by only asking questions to people of the form: ”Do you know him/her?” Solution Select two people from the group given, say, A and B, and ask A whether A knows B. If A knows B, remove A from the remaining people who can be a celebrity; if A doesn’t know B, remove B from this group. Solve the problem recursively for the remaining group of people who can be a celebrity Which design strategy does the following solution use? A-)Decrease-by-a-constant factor algorithm B-)Variable-size-decrease algorithm C-)Decrease-by-a-constant algorithm D-)Divide-and-ConquerDISCRETE STRUCTURE How many ways are there to choose a dozen of donuts from 20 veritiesa) If there are no two donuts of the same varietyb) If there is no restrictionc) If there must be at least six kaya-filled donuts.
- Question 4 - Algorithm Design Imagine you are a treasure hunter standing at one side of the river. There are n (a positive integer) stones on the river. They are aligned on a straight line and at the nth stone, there is treasure waiting for you. Your target is to reach the nth stone. For each move, you have the choice of either walking (move one stone ahead) or leaping (move two stones ahead). Also, you are not allowed to travel backwards. Design an algorithm that calculates the number of ways (sequences of walks/leaps) that get you to the treasure stone. You should clearly explain the algorithm and demonstrate the correctness of the algorithm with a complete proof. Here is an example. For n = 1 5, there are 8 ways: Method 1: walk → walk → walk → walk → walk Method 2: walk → walk → walk → leap Method 3: walk → walk → leap → walk Method 4: walk → leap → walk → walk walk Method 5: leap → walk → walk → Method 6: leap → leap walk Method 7: leap → walk → leap Method 8: walk → leap leapTranscribed Image Text A student took four quizzes in a term and would like to compute their average. He also would like to know what will be the remarks. Follow the range of grades and its equivalent remarks, and then fill-up the table below: 100-95 - Excellent 94-90 – Very Satisfactory 89-85 - Satisfactory 84-80 - Fine 79-75 - Fair 74 and below - PoorThe Philosophers' Dinner Problem Five philosophers sit around a table and spend their lives dining and thinking. Each philosopher has a bowl of noodles and a fork to the left of your plate. To eat the noodles you need two forks and each philosopher you can only take the ones to your left and right. If any philosopher takes a fork and the other is busy, he will wait, fork in hand, until pick up the other fork, so you can start eating later. If two adjacent philosophers try to pick up the same fork at the same time, a race condition: they both compete to take the same fork, and one of them left without eating. If all the philosophers take the fork to their right at the same time, then everyone will be waiting forever, because someone must release the fork that is lack. No one will because everyone is in the same situation (hoping that someone put down their forks). Then the philosophers will starve. This lock mutual is called deadlock or deadlock. The problem is to find an algorithm that…
- 10 - In an examination, 500 students appeared. Out of these students, 38 % got A+ grade, 45 % got B+ and the remaining just passed. Assuming that no student failed, find the number of students who got A+, B+ and the number of students who just passed.(Python code)50 40 30 20 10 4 6 8 10 12 14 Time (s) The diagram above shows the journey of a train plotted as a velocity-time graph. Find: a) The acceleration on the first part of the journey b) The total distance covered in the first 10 seconds c) The amount of time that the train is travelling at constant velocityGoal Seek function in Excel - Select the incorrect answer a. The changing cell in Goal Seek should have a formula b. Allows the user to determine the desired INPUT value for the formula, where the OUTPUT value is already known c. Goal Seek finds out one variable, Solver can find out more variables d. It gets the answer immediately, it does not use the trial and error approach until it gets an answer