16 Type the correct answer in the box. Use numerals instead of words. If necessary, use /for the fraction bar. var num2 = 32; var num1 = 12; var rem-num2 % num1; while(rem> 0) { num2 = num1; num1 =rem; rem =num2 % num1; document.write(num1): The output of the document.write statement at the end of this block is Reset Next
Q: Girl Scout Troop 815 has 18 members. Write a program in which the troop leader can enter the number…
A: Please find the answer to the above question below:
Q: Morse code is a code where each letter of the English alphabet, each digit, and various punctuation…
A: Morse code is a method used in telecommunication to encode text characters as standardized sequences…
Q: void showValues(int a[4]), int cols = 5) { for (int roW = 1; row <= 4; row++) for (int col = 1; col…
A: Task :- Identify the errors in given piece of code.
Q: Some sample runs of the program are included below (user input is in bold): > java ThreeWords Enter…
A: As per our guidelines, we are supposed to answer only one question. Kindly repost the remaining…
Q: I cant get it right. Modify the BarChart program from Chapter 6 Exercise 13 to accept the number…
A: Algorithm: Start Read points scored by each player in a season Divide the points of each player by…
Q: int x,y,z; string area x=Convert. ToInt (Consol.Writeline("Enter the x dimension")); y=Convert.…
A: v has to be declared and area has to be int ToInt is not valid method Console is used to perform…
Q: QUESTION 3 str = "Ho"*3 +"!" str is QUESTION 4 major= "Computer Science" major[3] is QUESTION 5…
A: Note: As per the Bned policy we are suppose to attempt at-most three questions at a time. If you…
Q: Mad Libs are activities that have a person provide various words, which are then used to complete a…
A: *Your not mentioned to write a particular programming language so we provide python code for you.…
Q: N ingredients in the menu. Every ingredient has its beauty value that does not depend on its taste,…
A: Given: There is only one list of N ingredients in the menu. Every ingredient has its beauty…
Q: String word = "Ivan loves pancakes"; String phrase = "Ivan love"; // #S.o.p(...) means…
A: Solution :
Q: This program reads one number, as a string, and assign it to String getData Increment and display…
A: As no programming language is mentioned, it is solved using Java
Q: (Occurrences of a specified character) Write a method that finds the number of occurrences of a…
A: Please find the answer below
Q: characters that represents a maze. Each position can contain either an X or a blank. Starting at…
A: Write a function that accepts an 8 by 8 array of characters that represents a maze. Each position…
Q: Obviously that the program has many syntax errors. Rewrite the entire program after correcting…
A: A class is a user-defined data type that combines data members and methods for manipulating that…
Q: Use java code to complete. Please zoom in if difficult to re
A:
Q: 9: perfect.cpp) A number is called perfect if the sum of its divisors is equal to the original…
A: #include <iostream>using namespace std; const int LIMIT = 5000; int sumOfDivisors(int); int…
Q: What is the output of the following code?
A: The ostream class is represented by the C++ cout expression. It's utilized to generate output for…
Q: // Airline.cpp - This program determines if an airline passenger is // eligible for a 25% discount.…
A: Note: I HAVE GIVEN THE SOLUTION AS PER THE OUTPUT GIVEN IN THE QUESTION. Define header file…
Q: thedW.d What will the following code display? void showDub (int); 5. int main () int x = 2; cout « x…
A: Step 1:- Given:- void showDub(int);int main(){ int x=2; cout<<x<<endl;…
Q: **3.23 (Geometry: point in a rectangle?) Write a program that prompts the user to enter a point (x,…
A: C++ Program for above : #include <iostream> using namespace std; int main() { int…
Q: Problem Descriptions: In this problem, your task is to write a program to find whether a…
A: Since no specific language is mentioned so writing the program in C++ language. CirclePoint.cpp…
Q: Please Write java application not python please? You giving us wrong answers we dont need python we…
A: import java.util.*; public class Limpopo{ public static void main(String args[]) {…
Q: 5. (Algebra: solve 2 x 2 linear equations) You can use Cramer's rule to solve the following 2 X 2…
A: Step-1: StartStep-2: Declare variables a, b, c, d, e, f, x, y, valueStep-3: Take input from user a,…
Q: Aquarium Fish - length: double - width: double - height: double fishes: Fish [ ] - name: String -…
A: If you want to run the code you can run it on online GDB compiler. I have bolded out the code for…
Q: cout > studentname; cout > score; cout > totalpoints; count = count++; finalscore = score /…
A: Hey, thank you for your question. As per your question, we understand that your given code would…
Q: Questions - (Has 2 Parts). Based on each code, which answer out of the choices "A,B,C,D,E" is…
A: Refer to step 2 for the answer.
Q: 7.5 LAB: Name format Many documents use a specific format for a person's name. Write a program…
A: The error is generated because the program is given only one input and then expects the output. But…
Q: You are asked to write a small division calculator, where you are taking 'a' as dividend and…
A: The above question is solved in step 2 :-
Q: Q4) Fibonacci numbers are the numbers in a sequence in which the first two elements are 0 and 1, and…
A: Algorithm : Step 1 : initialize the number of terms as 25. Step 2 : initialize the first number as…
Q: Geometric Progression Printer As you might recall, a Geometric Progression (or GP) is a sequence of…
A: ALGORITHM:- 1. Take input for the a1, r and the number of terms to generate in the gp. 2. Print the…
Q: Smajors['CS'] = 'Computer Science'; //Line 1 Smajors['MTH'] = 'Mathematics'; I/Line 2 echo "The two…
A: Answer : A mistake was found in line number 3 ie. Line 3.
Q: Python Assignment: In India McDonald's has the n number of customers and they are famous for their…
A: Required:
Q: 2) Minimize the following DFA (use the tabular method explained in the lecture notes and class).…
A:
Q: Here are the contents for a movie: Lab 27 Home Alone Jeff Nunn 1990 Here are the contents for a…
A: According to the question We have to write code for the following question: Sample code and output…
Q: Geometric Progression Printer As you might recall, a Geometric Progression (or GP) is a sequence of…
A: Step-1: Start Step-2: Declare variable a1 and take input from user Step-3: Declare variable r and…
Q: 17. Math Tutor Write a program that can be used as a math tutor for a young student. The program…
A: Random generator = new Random(); int a = generator.nextInt(1000); //Generates a random number…
Q: def display (): print ("ITSE101") def displayNumber (n1, n2): if nl > n2: return nl + n2 else:…
A: I have provided the comments to the given code and output.
Q: System.out.println("please enter 5 skills you have! "); String[] str = new String[5]; for(int…
A: EXPLANATION - A program is created . In program in main class firstly a for loop is created the 5…
Q: Q2/ Write True if the sentence is true and False if the sentence is false and correct the false…
A: 1. The logical operator (^) means NOT. Ans: False
Q: Body wanted to go on a tour but he was confused about what items to bring. In order to show his…
A: Hello student. As per the policy, I'll answer the first question. For the solution to second…
Q: 5-3) (Find the highest score) Write a program that prompts the user to enter the number of students…
A:
Q: Python Assignment: In India McDonald's has the n number of customers and they are famous for their…
A: Coded in Python 3.
Q: #include using namespace std; lprototypes should go here - you don't need to write them int main) {…
A: A) &num1,&num2,&num3 B) num1,num2,num3,&lowest,&highest C) average = D)…
Q: Three numbers a. Write a program that reads three numbers and prints “all the same” if they are all…
A: Note:- Since programming language is not mentioned we are providing solution in c++ . please repost…
Q: What is wrong in the following code?
A: In the given image (a): The Class circle has an object c1 but when declaring the object “( )” has…
Q: Q1 Write T if the sentence is true and F if the sentence is false and correct the false sentence.…
A: Note - As per the guidelines we are only allowed to answer 1 question with three sub parts at a…
Q: Kindly edit the code and display the menu again after completing the fucntion. #include #include…
A: update added a function call menu() that will display the menu.
Q: // Airline.cpp - This program determines if an airline passenger is // eligible for a 25% discount.…
A: Programming instructions: Include necessary header files. Declare all the functions. In the main,…
Q: Transcribed Image Text A student took four quizzes in a term and would like to compute their…
A: The problem is based on the basics of conditonal statements in programming languages. NOTE: The…
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- design patterns quetion public double calculatePerimeter(Shapes [] shapes) { double p = 0;for (Shape shape : shapes) { if (shape is Rectangle) { Rectangle rectangle = (Rectangle) shape; p += (rectangle.Width+rectangle.Height) * 2; } else { Circle circle = (Circle)shape; p += 2 * circle.Radius * Math.PI; } } return p; } which design principle is violated in the above code? what is the issue/ limitation of this code? rewrite the code to not violate the design principle you answered in part 1?def area(side1, side2): return side1 * side2s1 = 12s2 = 6Identify the statements that correctly call the area function. Select ALL that apply. Question options: area(s1,s2) answer = area(s1,s2) print(f'The area is {area(s1,s2)}') result = area(side1,side2)Microsoft Visual C# 7th edition. need help, please. Thanks In previous chapters, you created applications for Marshall’s Murals. Now, modify the version of the MarshallsRevenue program created in Chapter 5 so that after mural data entry is complete, the user is prompted for the appropriate number of customer names for both the interior and exterior murals and a code for each that indicates the mural style: L for landscape S for seascape A for abstract C for children’s O for other When a code is invalid, re-prompt the user for a valid code continuously. For example, if Y is input, output Y is not a valid code, and re-prompt the user until a valid code is entered. After data entry is complete, display a count of each type of mural. For example the output should be in the following format with the correct number next to each mural type: The interior murals scheduled are: Landscape 1 Seascape 2 Abstract 1 Children's 3 Other 9 The exterior murals scheduled are: Landscape 4 Seascape 0…
- Kindly edit the code and display the menu again after completing the fucntion. #include<iostream>#include<conio.h>#include "Course.h"using namespace std;int main(){ int course_id; string course_name; int courseID; string courseName; int capacity; int enroll; int currentlyEnrolled; int user=0; //adding new course int select; cout << "Kindly select the option to perform "<<endl; cout << "1. Add New Course "<<endl; cout << "2. Enroll Student "<<endl; cout << "3. Search Student"<<endl; cout << "4. Drop course "<<endl; cout << "5. View Course Reports" << endl; cin >> select; cout << endl; if (select == 1) { Course* C = new Course[10]; cout << "kindly enter course name" << endl; cin >> courseName; cout << "kindly enter course id" << endl; cin…C++ program int quadrant() This method will return at which quadrant does this point lie in our Cartesian plane. You may use the internet to recall your quadrants in the Cartesian coordinate system. This method will return 1 if it is in Quadrant I (+, +), 2 if it is in Quadrant II (-, +), 3 if it is in Quadrant III (-, -), and 4 if it is in Quadrant IV (+, -). If the point lies in the x-axis, return -1. If the point lies in the y-axis, return -2, if the point is in the origin, return 0.Code an application that determines how many gallons of water is needed for a pool. Create Void Methods for the Header and Directions. Create 3 Value-Returning Methods that will return length, width, and height. Create another Value-Returning method that will accept 3 arguments (length, width, and height) and return the number of gallons needed. Use Math.Ceiling for the number of gallons. Use C# Coding Standards. Use placement holders and Format Specifiers in all write statements. Create algorithm table before you write the program. Submit table with program. To calculate the gallons needed: 1 cubic foot of pool needs 7.5 gallons and declare as a constant.
- In PYTHON Print values from the Goal column only Print values only for columns: Team, Yellow Cards and Red Cards Find and print rows for teams that scored more than 6 goals Select the teams whose name start with a G Print values only for columns Team and Shooting Accuracy , and only for rows in which the team is either of the following: England, Italy and Spain Find and print rows for teams that scored more than 6 goals and at least 4000 passes Team Goals Shots on target Shots off target Shooting Accuracy Goals-to-shots (perc) Total shots (inc. Blocked) Hit Woodwork Penalty goals Penalties not scored Headed goals Passes Passes completed Passing Accuracy Touches Crosses Dribbles Corners Taken Tackles Clearances Interceptions Clearances off line Clean Sheets Blocks Goals conceded Saves made Saves-to-shots ratio Fouls Won Fouls Conceded Offsides Yellow Cards Red Cards Subs on Subs off Players Used Croatia 4 13 12 0.5 0.16 32 0 0 0 2 1076 828 0.769 1706 60…Customer Number Sex Blood Type No. Of Liters 2 M 1 4 Total Amount per Blood Type A: B: p500O: AB: p703.5Buy another blood<Y/N>? N Total Amount: p1203.5Amount Paid: p1500.00 (will not accept if amount paid is less than total amount) 1. Design a program that allows user to input the ff. DESCRIPTION TYPE VARNAMECustomer Number integer CustomerNSEX (M/F) char SEXBlood Type<0-3> integer btypeNo. of Liters float/double NOLAmount Paid float/double amtTotal Amount float/double t_amt 2. Count Dracula prefers various type of blood, his rate per liter for each btype are given as follows. Type A - p300 plus 20.0025 for every literB- p500 for the 1st 5 liters, and 60.0025 per liter in excess of 5 liters.AB- p400 for the 1st 3 litersP500 above 3 liters but below 5 litersP700 if equal to 5 liters and p1.75 per liter beyond 5 litersO- p250 per liter7 liters of ABexcess = 2 *1.75total AB amount = 700 + excess 3. Your program should process N number of transactions. (at least 2)4. Validation…Instructor note: Important Coding Guidelines: Use comments, and whitespaces around operators and assignments. Use line breaks and indent your code. Use naming conventions for variables, functions, methods, and more. This makes it easier to understand the code. Write simple code and do not over complicate the logic. Code exhibits simplicity when it’s well organized, logically minimal, and easily readable. A pedometer treats walking 1 step as walking 2.5 feet. Define a method named feetToSteps that takes a double as a parameter, representing the number of feet walked, and returns an integer that represents the number of steps walked. Then, write a main program that reads the number of feet walked as an input, calls method feetToSteps() with the input as an argument, and outputs the number of steps. Use floating-point arithmetic to perform the conversion. Ex: If the input is: 150.5 the output is: 60 The program must define and call a method:public static int feetToSteps(double…
- Instructions: 1. This java program is for an application that stores the author (Writer) data of some books and emails. 2. getAuthors() method get the list of authors and store it in a String array. 3. addAuthors() method is used to add an author anytime for book or email. 4. getDate() method get the date of the book or email. 5. getTitle() method can be used to get the title of the book. 6. getSubject() method is used to get the Subject of the email. 7. getTo() method is used to get the information about the mail to whom it is sent. 8. All get methods need to return the values in the corresponding instance variables. 9. Scanner class can be used to set the data for the variables. The programmer can give his/her own methods to set the instance variablesoks My library > CST 112: Introduction to Programming home > 2.11: Integer division and modulo 211.3. Integer alvision and moquio. ACTIVITY 477358 3451196.73zqy? Jump to level 1 Integer variables totalVolume and itemVolume are read from input. An item takes up itemVolume cubic inches, and the volume of a box is given by totalVolume cubic inches. Assign remainingVolume with the remaining volume after filling as many boxes as possible. Ex: If the input is 13 4, then the output is Remaining volume: 1 1 import java.util.Scanner; 2 3 public class RemainingVolume { 4 5 6 7 TO68L 9 10 11 12 13 14 15 16 17 } public static void main(String[] args) { } Scanner scnr = new Scanner(System.in); int totalvolume; int itemVolume; int remainingVolume; EzyBooks catalog ? Help/FA totalvolume = scnr.nextInt(); itemVolume = scnr.nextInt(); /*Your code goes here / System.out.println("Remaining volume:" + remainingVolume); 1 2 31Treasure Hunter description You are in front of a cave that has treasures. The cave canrepresented in a grid which has rows numbered from 1to , and of the columns numbered from 1 to . For this problem, define (?, )is the tile that is in the -th row and -column.There is a character in each tile, which indicates the type of that tile.Tiles can be floors, walls, or treasures that are sequentially representedwith the characters '.' (period), '#' (hashmark), and '*' (asterisk). You can passfloor and treasure tiles, but can't get past wall tiles.Initially, you are in a tile (??, ). You want to visit all the treasure squares, andtake the treasure. If you visit the treasure chest, then treasurewill be instantly taken, then the tile turns into a floor.In a move, if you are in a tile (?, ), then you can move tosquares immediately above (? 1, ), right (?, + 1), bottom (? + 1, ), and left (?, 1) of thecurrent plot. The tile you visit must not be off the grid, and must not be awall patch.Determine…