Q2/-A- What is printed by the following code fragment? Int x1=4 , y1, x2=6, y2; yl=++x1; y2=x2++; x2=y1++; cout >> x1 >>" &&" >> x2 >> 'n' cout >> y1 >>"&& ">> y2 >> '\n'
Q: Write an application that prompts the user for a password that contains at least two uppercase…
A: Syntax: do { // Loop-body } while ( Condition ) ; Flowchart:
Q: Find the output of the following code: string str = "Happy Birthday !11"; %3D MessageBox.…
A: To do: Output of the given code:
Q: Consider the following code. Then choose the equivalent pseudocode? спр еах, var2 jbe L1 mov var3,10…
A: Hello student. Warm welcome from my side. Hope you are doing great. I will try my best to answer…
Q: 8. Write a program that allows the user to enter two integers and a character If the character is A,…
A: As per our company guidelines, we are supposed to answer only one question per post and kindly…
Q: The date June 10, 1960, is special because when it is written in the following format, the…
A: Given : The date June 10, 1960, is special because when it is written in the following format, the…
Q: // Currently, this program displays data for all students. Modify it to display only those who have…
A: To display the data for the students who have more than 60 credits and have a GPA of at least 3.5,…
Q: Three-letter acronyms are common in the business world. For example, in Java you use the IDE…
A: import java.util.*; public class ThreeLetterAcronym{ public static void main(String []args){…
Q: First, launch NetBeans and close any previous projects that may be open (at the top menu go to File…
A: Given: create a new Java application called "WeightedAvgDropSmallest" (without the quotation marks)…
Q: Reza Enterprises sells tickets for buses, tours, and other travel services. Because Reza frequently…
A: Algorithm: Start READ Num Compute: lastDigit = Num % 10 Compute: modNum = Num / 10 IF modNum% ==…
Q: 1. execute the program in the background 2. obtain process status 3. show to the zombie child…
A: The Program referenced in the question Lab7.c ,creates a Zombie process. The program creates a…
Q: 2. Create a program that computes and displays a game character's attack speed at a certain level.…
A: Given : To write a program to print the character current attack speed using the above formula. The…
Q: V/ This pseudocode is intended to display employee net pay values // All employees have a standard…
A: The solution for the above given question is given below:
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: A parking garage charges a $2.00 minimum fee to park for up to three hours and an additional $0.50…
A: Program for the given problem :- #include <stdio.h> float getCharge(float hours){ float…
Q: Suppose that classStanding is a char variable, gpa and dues are double variables. Write a switch…
A: Program: //include the header file #include <iostream> using namespace std; //definition…
Q: First, launch NetBeans and close any previous projects that may be open (at the top menu go to File…
A: Program: import java.util.ArrayList;import java.util.Scanner; public class WeightedAvgDropSmallest…
Q: Widgets and Gizmos An online retailer sells two products: widgets and gizmos. Each widget weighs 75…
A: code is given below:
Q: Write an application named EnterUppercaseLetters that asks the user to type an uppercase letter from…
A: Here, Code instruction is given.
Q: 2- What will the following code do? j=0; i=5; while(j<0) j=j-1; i=i+5;j=i; end
A: Given Code: j= 0;i= 5;while(j<0) j = j-1; i = i+5; j = i;endRequired:Explain what the…
Q: 1. Write an application that prompts for and reads the user's first and last name (separately), then…
A: Answer:
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: Each cout statement has a syntax error. Type the first cout statement, and press Run to observe the…
A: Answer Code in C++ #include <iostream> using namespace std; int main() { int songNum;…
Q: H26.CPP ---------------------------------------------------------------- #include #include…
A: Working code implemented in C++ and appropriate comments provided for better understanding. Here I…
Q: V/ This pseudocode is intended to display employee net pay values. // All employees have a standard…
A: 1) Pseudocode in question does below activity It declare variables name, hours, rate, DEDUCTION,…
Q: Three-letter acronyms are common in the business world. For example, in Java you use the IDE…
A: Program description : The java program, ThreeLetterAcronym.java prompts users to enter three words…
Q: Project 9-1: Interest Calculator Create a program that calculates the interest on a loan. Console…
A: Here I have used an infinite loop. Inside the loop, I have taken input from the user and then…
Q: Anagram words Write a C code that asks users to enter two words, one after the other and checks if…
A:
Q: include using namespace std; main () { int a, b, c, sum; cout >a; cout > b; cout > c;
A: I have given output with the explanation step wise step below.
Q: blä: 3 This code program enters the value of x then the value of y is computed from one of the…
A: Required : To select proper statement from the given options.
Q: Online Book Merchants offers premium customers 1 free book with every purchase of 5 or more books…
A: GIVEN:
Q: (Physics: acceleration) Average acceleration is defined as the change of velocity divided by the…
A: Precise Acceleration is characterized as the time pace of progress of rakish speed. It is normally…
Q: #include using namespace std; int main() { int A, B, C, Total, Average; cout > A; cout > B; cout >…
A: 1. Answer: The given program first inputs three integers A, B, and C from the user then prints the…
Q: nclude #include using namespace std; #include "h25.h" // Add your code here PLEASE WRITE THE
A:
Q: What will be displayed by the following statement? (Hint: Indent the statement correctly first.) int…
A: Output of the code for if else if loop is detailed in step 2
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: View //This pseudocode is intended to display employee net pay values. E//All employees have a…
A: The solution for the above given question is given below:
Q: Using a conditional expression, write a statement that increments numUsers if updateDirection is 1,…
A: To create a conditional expression, by adding some code statements to the given program code. So,…
Q: Q1 Answer the following: L It is possible in visual basic 6.0 to detect the errors while the…
A: The Answer is in given below steps
Q: Create a VB.NET Console Application that does the following: Create a variable of Integer data…
A: Background:- base concept of if else if ladder is used here. First take input and check the range…
Q: QUESTION 8 Kebabo Internet Services offers customers with 600 weekday minutes for a flat rate of…
A: ANSWER:-
Q: One way to use the browser console to view the progression of the value of the totalPrice variable…
A: The question is to choose the correct option for the given question.
Q: . Write an application for a college’s admissions office. Prompt the user for a student’s numeric…
A: PROGRAM INTRODUCTION: Import the required header files. Start the definition of the main function.…
Q: Create a change-counting game that gets the user to enter the number of coins required to make…
A: Since you are not mentioning the programming language, here we are using C++ to complete the…
Q: 15 - final question Assuming you have implemented a mini calculator. U MiniCalculator Result Number…
A: Since we need to check for missing input in textboxes, we need check both the textboxes. No single…
Q: Three-letter acronyms are common in the business world. For example, in Java you use the IDE…
A: Approach Built-in methods used: toUpperCase() length() charAt()
Q: Irite a program that prompts the user to input an integer between 0 and 35. If the number is less…
A: #include <iostream>#include <iomanip> Below is the code for a given requirement using…
Q: What would be displayed as the daily dosage of medicine to be administered to a dog weighing 4.9…
A: Given psudocode is if dogWeight numeric then number500 = dogWeight * 2 if number500 MOD 1…
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: 2- What is the value of x in the following expression? 26 x = 15 ÷ (2 + 3) * |1+3
A: x=15/(2+3)*sqrt((2^6)/(1+3)) x= 12.
Q: Phython assignment Exercise 1: Oreo cookies Check out the nutritional values of an Oreo cookie…
A: The complete Python code is given below with screenshots. Variables are used in the code
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
Step by step
Solved in 2 steps
- Rock, Paper, Scissors Game Create a application using (C#) in Microsoft Visual Studio that lets the user play the game of Rock, Paper, Scissors against the 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, then the computer has chosen paper. If the number is 3, then the computer has chosen scissors. (Do not display the computer’s choice yet.)2. The user selects his or her choice of rock, paper, or scissors. To get this input you use clickable PictureBox controls displaying some of the artwork that you will find in the student sample files.3. The computer’s choice is displayed.4. A winner is selected according to the following rules: •If one player chooses rock and the other player chooses scissors, then rock wins. (Rock smashes scissors.)•If one player chooses scissors and the other player chooses paper, then scissors wins.…Anagram words Write a C code that asks users to enter two words, one after the other and checks if these words are anagrams (permutations of the same letters). For instance, the words “smartest” and “mattress” are anagrams. Examplea Run 1: Please enter first word: lookplease enter the second word: coolSorry! “cool” and “look” are not anagrams. Run 2: Please enter first word: masters please enter the second word: smartes Yes! “masters” and “smartes” are anagrams. Hint: If you sort the two words that are anagrams, they will become identical! For instance, “smartest” and “masters” both sort to “aemrsstt” You can use all functions in <string.h> Sorting a string is exactly similar to sorting an array. You just need to know the length of the string and make sure you do not touch the terminating null.Using C# in Microsoft Visual Studio create an application that lets the user play the game of Rock, Paper, Scissors against the 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 is2, then the computer has chosen paper. If the number is 3, then the computer has chosen scissors. (Do not display the computer’s choice yet.)2. The user selects his or her choice of rock, paper, or scissors. To get this input you can use Button controls, or clickable PictureBox controls displaying some of the artwork that you will find in the student sample files.3. The computer’s choice is displayed.4. A winner is selected according to the following rules:• If one player chooses rock and the other player chooses scissors, then rock wins. (Rock smashes scissors.)• If one player chooses scissors and the other player chooses paper, then scissors wins. (Scissors…
- Problem Description: The international standard letter/number mapping found on the telephone keypad is shown below: Write a pseudocode and program that reads a letter and displays its corresponding digit. 2 3 1 ABC DEF 4 5 6 GHI JKL MNO 7 8 9 PQRS TUV WXYZ 0 Write a pseudocode on how you would solve the problem in your own word. Write a java program called Phone considering the following directions. Practice here first then write answer on the answer sheet. Also, make sure distinguish high and low caps as Java is case – sensitive. Import and declare a Scanner class Ask user for an Upper – case letter Use the switch statement along with case and break Use the System.exit(1) in the default to terminate the program Print the corresponding digitNice Number Programming: Nice program ask user to enter three integers from keyboard (java console), the three integers represent left bound, right bound and arbitrary digit 'm', where left bound is less than right bound. Program should print all nice numbers in the given range that doesn't contain digit 'm'. The number is nice if its every digit is larger than the sum of digits which are on the right side of that digit. For example 741 is a nice number since 4> 1, and 7> 4+1. with digit m=2. Write a complete program in Java that Call only One method (niceNumbers method) that will print all nice numbers excluding a given digit 'm' that also entered by user?Twin primes are a pair of prime numbers that differ by 2. Forexample, 3 and 5 are twin primes, 5 and 7 are twin primes, and 11 and 13 aretwin primes. Write a program to find all twin primes less than 1,200. Display theoutput as follows:(3, 5)(5, 7)...
- Computer Fundamentals and Programming 2 Write a program that determines a student’s grade. The program will accept 3 scores and computes the average score. Determine the grade based on the following rules: - If the average score is equal or greater than 90, the grade is A. - If the average score is greater than or equal to 70 and less than 90, the grade is B. - If the average score is greater than or equal to 50 and less than 70, the grade is C. - If the average score is less than 50, the grade is F. Source Codes and Print Screen of the OutputNumber guessing Game Write a C program that implements the “guess my number” game. The computer chooses a random number using the following random generator function srand(time(NULL)); int r = rand() % 100 + 1; that creates a random number between 1 and 100 and puts it in the variable r. (Note that you have to include <time.h>) Then it asks the user to make a guess. Each time the user makes a guess, the program tells the user if the entered number is larger or smaller than its number. The user then keeps guessing till he/she finds the number. If the user doesn’t find the number after 10 guesses, a proper game over message will be shown and the actual guess is revealed. If the user makes a correct guess in its allowed 10 guesses, then a proper message will be shown and the number of guesses the user made to get the correct answer is also printed. After each correct guess or game over, the user decides to play again or quit and based on the user choice, the computer will make…Java question Write a program that plays the Rock-Paper-Scissors game againstthe computer. When played between two people, each personpicks one of three options (usually shown by a hand gesture) atthe same time, and a winner is determined. In the game, Rockbeats Scissors, Scissors beats Paper, and Paper beats Rock. The program should randomly choose one of the three options (with-out revealing it), then prompt for the user's selection. At that point, the program reveals both choices and prints a statementindicating if the user won, the computer won, or if it was a tie.Continue playing until the user chooses to stop, then print thenumber of user wins, losses, and ties.
- pls debug this pseudocode // A high school is holding a recycling competition,// and this program allows a user to enter a student's // year in school (1 through 4) and number of cans collected// for recycling. Data is entered continuously until the user// enters 9 for the year.// After headings, output is four lines --// one for each school year class.start Declarations num year num cans num SIZE = 4 num QUIT = 9 num collectedArray[SIZE] = 0, 0, 0 string HEAD1 = "Can Recycling Report" string HEAD2 = "Year Cans Collected" output "Enter year of student or ", QUIT, " to quit " input year while year <> QUIT output "Enter number of cans collected " input cans collectedArray[year] = collectedArray[year] + cans output "Enter year of student or ", QUIT, " to quit " input year endwhile output HEAD1 output HEAD2 year = 1 while year < SIZE output year, collectedArray[year] year = year + 1…Change the calendar printing program so it starts the week on a Sunday. Also make it print a newline at the end (but only one). This program had to utilize the code from page 61 and make the necessary changes for printing it. The code itself would display the calendar and you would not have to use the println function as you would have to do that for every single month and year. The program would grab the month a year you selected and display it. import java.time.DayOfWeek;import java.time.LocalDate; public class Calendar { public static void main(String[] args) {// TODO Auto-generated method stubint month = 0;int year = 0;LocalDate date= LocalDate.of(year, month, 1);while (date.getMonthValue() == month) {System.out.print(date.getDayOfMonth());date = date.plusDays(1);}DayOfWeek weekday = date.getDayOfWeek();int value = weekday.getValue();for (int i = 1; i<value; i++);System.out.print(" ");int value1 = date.getDayOfWeek().getValue(); import calendar;y = int(input("Input the years…The following code intends to input a user’s first name, last name, and age.However, it has an error. Fix the code.string fullName;int age;cout << "Enter your first and last name." << endl;cin >> fullName;cout << "Enter your age." << endl;cin >> age;cout << "You are " << age << " years old, " << fullName << endl;