What should be printed on screen? int main() int x = 5; if(x++ == 5) cout<<"Five"<
Q: Activity #2: Taking limits to compute derivatives Write a program named Lab5a_Act2.py to compute a…
A: Actually. Python is a easiest programming language. It is a dynamically typed programming language.
Q: **3.19 (Geometry: point in a circle?) Write a program that prompts the user to enter a point (x, y)…
A: Step-1: StartStep-2: Declare variable x, y, distanceStep-3: Calculate distance by using square root…
Q: Problem Description: The international standard letter/number mapping found on the telephone keypad…
A: The pseudocode is as follows:Prompt user for a letter in upper caseReceive the input.Convert the…
Q: Bob takes medication three times a day. In the morning at 8:00, in the afternoon at 13:00, and in…
A: The Enum in C is a data type which contains a fixed set of constants. The enum constants are…
Q: n C++, using STL algorithms, iterators, or containers get the total from the textfile icecream.txt.…
A: program: #include <iostream>#include <fstream>#include <string>#include…
Q: *3.1 (Algebra: solve quadratic equations) The two roots of a quadratic equation ax? + bæ + c = 0 can…
A: Code: import java.lang.Math;import java.util.Scanner; class Roots{public static void main(String…
Q: X609: Magic Date A magic date is one when written in the following format, the month times the date…
A: Create as MagicDate class and main method. Inside main method take month, day and year of a date as…
Q: Write a program that prompts for an integer (that a side length) and displays, using asterisks, a…
A: Actually, java is a object oriented programming language. It is a platform independent.
Q: C++ Angle Calculator Write a program that asks the user for an angle, entered in radians. The…
A: C++ Angle Calculator Write a program that asks the user for an angle, entered in radians. The…
Q: 4. Printing a grid. Write a program that prints the following grid to play tic-tac-toe. +--+ + I T |…
A: public class Main{ public static void main(String[] args) { String bottom = "+--+--+--+";…
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: T/F 9) The assignment statement d = p; is legal even though d is not a Poodle.
A: Please find the answer to the above question below:
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: int fun7 (int a) pushl rbp movi krap, Szbp movi 8(krbp),teax sali 54, teax addi 8(rbp), leax addi…
A: To do: which function compiled into assembly code
Q: int x switch 55, y = 5; (x87) { case 0: case 1: y++; case 2: case 3: y = y + 2; case 4: break; case…
A: 1. Given program contains two integer variables that are x=55 and y=5. Then it contains a switch…
Q: Twin primes are a pair of prime numbers that differ by 2. Forexample, 3 and 5 are twin primes, 5 and…
A: Program: //include header file import java.util.Scanner; //definition of main class public class…
Q: (B)What should be printed on C++ screen? #include void main() { int x = 5; if(x++ == 5)…
A: Explanation: iostream.h is a header file which contains defalut functions like cout ,cin . Here you…
Q: 10) The assignment statement p = d; is legal even though p is not a Dog.
A: Please see the next step for solution
Q: The Fibonacci series is a series that begins with 0 and 1 and has the property that each succeeding…
A: PROGRAM CODE: #include <iostream> // include header file for input output stream…
Q: IN PYTHON PLEASE AND FLOWCHART DRAWING COPUTERIZED PLEASE!! In many businesses across the…
A: Program:- import sysTotalAmount=input("Enter total cost of purchase: ") GivenCash=input("Enter…
Q: Please write a console application "c/c++" required to get the following output ***** **** ***…
A: Your C++ program is given below as you required with an output.
Q: Activities at Lake LazyDays As activity directory at Lake LazyDays Resort, it is your job to suggest…
A: ANSWER:-
Q: #include stars in the form of void main(){ int i,j; for (i=0;i0;j-{ if(j>5+i| lj<5-i) cout<<" ";…
A: For i =0 and j =10 the if condition becomes true that is 10 >5 hence the print statement will…
Q: So if the new balance is $38.00 then the person must pay the whole $38.00; if the balance is S128…
A: CODE: JAVA PROGRAMMING LANGUAGE import java.util.*;import java.text.*;public class CreditCardBill{…
Q: Assume that an int variable age has been declared and already given a value. Assume further that the…
A: Given:
Q: Jane has opened a new fitness center with charges of 2500 per month so the cost to become a member…
A: Note : I have added the output screenshot. Also with total money made, the code prints members and…
Q: a Questions - (Has 2 Parts). Based on each code, which answer out of the choices "A,B,C,D,E" is…
A: The given parts are related to Java packages (in-built) calendar and TimeZone which are used to get…
Q: Task 1: Воx - width : double - height : double - depth : double + Box() + Box(len : double) +…
A: GIVEN:
Q: void (double a) cout<<"" a = "; cout<<a<<endl; ... %3D
A: Given:
Q: onsider writing code that starts with the ima nage, resulting in the picture on the right be
A: var image=new Simpleimage("Chapel.png"); print(image);
Q: Assume that a variable age has been given an integer value. Assume further that the user has just…
A: CODE IN PYTHON: #taking age as input from the userage = input("Enter your age:")age…
Q: void func1(int&); void func2(int&, int&); void func3(int, int); eint main(){ int x = 0, y = 0, z =…
A: Introduction of the Program: The C++ program is an example of pass by reference where the reference…
Q: 3.12:The Speed of Sound The speed of sound depends on the material the sound is passing through.…
A: Note: Since no programming language is mentioned, the program is provided in Java programming…
Q: ii. int x 55, y = 5; switch (x % 7) { case 0: case 1: y++; case 2: case 3: yy + 2; case 4: break;…
A: Dear Student, It is given that x = 55 and y = 5 , And x divided by 7 gives an remainder 6 thus x%7 =…
Q: Activity #2: Taking limits to compute derivatives Write a program named Lab5a_Act2.py to compute a…
A: Since you are asking multiple questions, we are answering first question for you. If you want…
Q: Tests that FindText() returns 5 for parameters "more" and "We'll continue our quest in space. There…
A: Here I'm attaching the whole working code: find text was not implmented #include<iostream>…
Q: Look at the following code. int x = 7; int *ptr = &x;What will be displayed if you send the…
A: Given: Look at the following code. int x = 7; int *ptr = &x;What will be displayed if you send…
Q: 5- What should be printed on C++ screen? #include void main() { int x = 5; if(x++ == 5)…
A: Option : E) None of the above Explanation : fatal error: iostream.h: No such file or directory 2…
Q: X609: Magic Date A magic date is one when written in the following format, the month times the date…
A: def magicDate(d, m, y): if d < 1 or d > 31: return False if m < 1 or m >…
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: 3.12:The Speed of Sound The speed of sound depends on the material the sound is passing through.…
A: Dear Student, The complete source code for your asked program is given in step 2 , with necessary…
Q: What will be displayed by the following code? int k = 0; while(k <= 10) {k++;} cout << k << endl;
A: I have given an answer in step 2.
Q: Trivia Game In this programming exercise, you will create a simple trivia game for two players. The…
A: Question.py • Define the class named “Question”. ○ Define “__init__()” method for “Question”…
Q: What will be displayed when the following code is executed? const int x = 7; int y = 10; y *= 5; y…
A: since you have asked multiple question ,we will solve the first question for you. If you want any…
Q: Write a program that calculates and displays a person's body mass index (BMI). The BMI is often used…
A: Below is the required C++ program: - Explanation: - Importing the header files and the namespace.…
Q: Create a grade calculator that computes for the semestral grade of a course. Students could type…
A: Python Code: # Enter the name, course, Prelim, mid term and finalName = input("Enter Student Name:…
Q: Craps is a single player dice game, that proceeds as follows: 1. the player rolls 2 six-sided dice…
A: Code: The python program is given by import random #function to calculate the sum of 2…
Q: (B)What should be printed on C++ screen? #include void mainO { int x = 5; if(x++ == 5)…
A: Given:
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- Write an application that determines the value of the coins in a jarand prints the total in dollars and cents. Read integer values thatrepresent the number of quarters, dimes, nickels, and penniesWrite an application that counts by five from 5 through 500 inclusive, and that starts a new line after every multiple of 50 (50, 100, 150, and so on). public class CountByFives { public static void main (String args[]) { // Write your code here } }In C++ class rectangleType { public: void setLengthWidth(double x, double y); //Sets the length = x; width = y; void print() const; //Output length and width double area(); //Calculate and return the area of the rectangle (length*width) double perimeter(); //Calculate and return the perimeter (length of outside boundary of the rectangle) private: double length; double width; }; Set the length of the rectangle to 24 and the width to 30.
- In C++ class rectangleType { public: void setLengthWidth(double x, double y); //Sets the length = x; width = y; void print() const; //Output length and width double area(); //Calculate and return the area of the rectangle (length*width) double perimeter(); //Calculate and return the perimeter (length of outside boundary of the rectangle) private: double length; double width; }; Print out the area of the rectangle.Java Questions - (Has 2 Parts). Based on each code, which answer out of the choices "A,B,C,D,E" is correct. Each question has one correct answer. Thank you. Part 1 - 5. Given the following code, the date is set to be __. Calendar cal = Calendar.getInstance();cal.set(2059, 0, 1, 2, 2, 1); A. Feb 1, 2059B. Mar 2, 2059C. Jan 1, 2059D. Feb 2, 2059E. Jan 2, 2059 Part 2 - 6. Given the following code, what is the output if the current time is 14:55:32? Calendar cal = Calendar.getInstance();System.out.println(get(Calendar.AM_PM)); A. AMB. PMC. 0D. 1E. Calendar.AMThis is the question - Write an application that counts the total number of spaces contained in a quote entered by the user. This is the code I have. The issue it seems to be counting like: "The number of spaces is 0 The number of spaces is 0 The number of spaces is 0 The number of spaces is 1 The number of spaces is 1 The number of spaces is 1", rather than just saying it once with the final number of spaces. This is my code - import java.util.*; public class CountSpaces2 { public static void main(String[] args) { // Write your code here Scanner input = new Scanner(System.in); int i; String quote; System.out.println("Please enter your quote "); quote = input.nextLine(); int numSpaces=0; for(i=0; i<quote.length();i++) { char ch=quote.charAt(i); if(ch == ' ') numSpaces++; System.out.println("The number of spaces is " +numSpaces); } } }
- Use JAVA CARD GRAPHICS to create a card game in which the dealer shuffles the deck and deals 13 cards to the player. The player sorts her hand and says whether it includes the King of Hearts. Repeat 4 times so all the cards are dealt eventually. Internally, the player should return true or false without writing to the console. In response, the dealer should write on the console, "You won!" or "You loose again." Also create a unit test for the win and loose cases.This must be done in Java.util.scanner. Class. Everything must have comments Write a Java application that displays two dialog boxes in sequence. The first asks you to think of a number between 1 and 10. The second displays a randomly generated number; the user can see whether his or her guess was accurate. (In future chapters, you will improve this game so that the user can enter a guess and the program can determine whether the user was correct. If you wish, you also can tell the user how far off the guess was, whether the guess was high or low, and provide a specific number of repeat attempts.) Save the file as RandomGuess.javaJAVA ONLYPlease create a code that checks if 'user' favourite game is in the top 3 games. if the game is in the top 3 then it should say: "common favourite game" if else then "uncommon favourite game"code: TOP_3_GAMES = {'', 'CALL OF DUTY', 'LEAGUE OF LEGENDS', 'VALORANT'}
- cerat javaFX 9-Rock, Paper, Scissors GameCreate a JavaFX application that lets the user play the game of rock, paper, scissors againstthe computer. The program should work as follows.1. When the program begins, a random number in the range of 1 through 3 is generated. If the number is 1, then the computer has chosen rock. If the number is 2, thenthe computer has chosen paper. If the number is 3, then the computer has chosenscissors. (Do not display the computer’s choice yet.)2. The user selects his or her choice of rock, paper, or scissors by clicking a Button. Animage of the user’s choice should be displayed in an ImageView component. (Youwill find rock, paper, and scissors image files in the book’s Student Sample Files.)3. An image of the computer’s choice is displayed.4. A winner is selected according to the following rules:l If one player chooses rock and the other player chooses scissors, then rock wins.(Rock smashes scissors.)l If one player chooses scissors and the other player…A class plays a fishing game in which a large tub is filled with plastic fish that are identical, except that some are red and the rest are white. A student is blindfolded and pulls 10 fish out of the tub. The student removes the blindfold, writes down how many of each color fish she got, and then puts the fish back in the tub. Each student takes a turn. The results are shown in the table. Display these data in a dot plot. Write and answer (to the extent possible) at least three questions about the data display in part (a); include at least one question at each of the three graph-reading levels discussed in the reading.Write an application that prompts a user for two integers and displays every integer between them. Display There are no integers between X and Y if there are no integers between the entered values. Make sure the program works regardless of which entered value is larger.