Program31.java Write a program that prompts the user to enter an even multiple of 17 between 200 and 300. Use just ONE boolean expression to test the input and report the input as acceptable, or not. Program32.java Write a program that prompts the user for any day of the week. Report the entered day as either a weekend day, or not. Use a switch and "stack" cases that require the same report as shown on page 103. Your program should handle bad inputs, too.
Q: Write a program that reads in three strings, sorts them lexicographically, calculates the size of…
A: required: To Write a program that reads in three strings, sorts them lexicographically, calculates…
Q: 3. Write a program that reads an integer between 0 and 1000 and adds all the digits in the integer.…
A: The Answer is in given below steps
Q: 5. Write a Java program to generate a random number in range [100, 999]: the digits in this random…
A: import java.util.*;public class Main{ public static void main(String[] args) { int t; int…
Q: 5) Write a program that reads three numbers and prints "increasing" if they are in increasing order,…
A: logic:- input three numbers . use > and && operator to check if they are in ascending…
Q: Problem: Write a Java program that will prompt for and read one word entered by the user, and…
A: The given problem is related to Java programming where the program will take a string input and…
Q: Q1: Write a program that reads a set of N integers. Then, the program finds and outputs the sum of…
A: Below I have provided a python program for the given question. Also, I have attached a screenshot of…
Q: write a java program A twin prime is a prime number that is either 2 less or 2 more than another…
A: I have given an answer in step 2.
Q: Write an application that counts the words in a String entered by a user. Words are separated by any…
A: Please find the answer below :
Q: Q7: Write a program that reads a collection of car speeds as long as the speeds do not exceed 100…
A: Program Approach: Including necessary header files Using namespace for standard input output…
Q: PROBLEM 7 Write a program that prompts the user to input two integers and prints a list of all the…
A: ALGORITHM:- 1. Take input for both the numbers. 2. Traverse for all the numbers until the smaller of…
Q: 6. Write a program that reads in the radius and height of a cone and computes the volume using the…
A: According to bartleby guidelines we need to solve only first question please post remaining…
Q: a nonpalindromic prime number whose reversal is also a prime. For example, 17 is a prime, and 71 is…
A: We will define two function isPrime() to check a number is prime or not and another function called…
Q: How would I go about writing the code in the problem in the picture?
A: Program AlgorithmCreate a class Prime_Numbers and define the main() function.Initialize the required…
Q: Assignment 3 Write a complete program that accepts two integer numbers num1 and num2, where num1 <…
A: You didn't specify any language for the problem, so i am doing it in C++ programming Langauge.…
Q: 5: CheckLetter.cpp) Write a program that adds a check letter to an eight-digit number. The check…
A: CODE:- #include <iostream>using namespace std; char letter(int n){ //split into 4 two digit…
Q: A number in base 2 (binary) is a number such that each of its digits is 0 or 1. To convert from…
A: As no programming language is mentioned, it is solved using basic C++
Q: Write a program that allows the user to enter a number between 1 and 1000. If the number is…
A: import math def isPrime(n): if (n <= 1): return False if (n <= 3): return…
Q: 2. Write a program that constructs a random telephone number of the form (XXX) xXX-XXXX and outputs…
A: code snippet:
Q: in java write a program that reads an unspecified number of integers, determines how many positive…
A: //import the required packages import java.util.Scanner; //define a class AvgWithLoop public class…
Q: 2. Write a program that constructs a random telephone number of the form (XXX) XXX-XXXX and outputs…
A: Dear Student, The complete source code for the asked program is given in step 2 also comments have…
Q: By looking at this formula, F=9/5C+32, it can be used to convert Celsius temp to Farenheight. Write…
A: According to Question below the Solution: Output:
Q: USE JAVA Write an application that allows a user to enter the names and birthdates of up to 10…
A: Given: USE JAVA Write an application that allows a user to enter the names and birthdates of up to…
Q: Can you write a new code in Java language with the values I sent you, just like this output? There…
A: Actually, c++ is a powerful general language. It is a high level language.
Q: 1. Write a program that uses one printf() call to print your first name and last name on one line,…
A: Note: This is multiple questions-based problem. As per company guidelines, only the first question…
Q: Q2\ Write a complete C++ program that shows the following output for a different number of rows…
A: We can use a simple for loop to solve this problem which will loop from 0 to n-1, where n is the…
Q: 6b conditionais Write a program that, after it prints the score, prints Good job!" if `score' is…
A: There is no mention of any particular language.I can make out from the editor that it's in Python.…
Q: 1- Write a java program that asks the user to input two integers intStart and intEnd then computes…
A: 1) read start and end value 2)Iterate n from 10 to 100 with step size 10 3)in above loop, For…
Q: Arrays a1, a2… are populated as shown; display a[i] for each calls to arr; if a[i] less than or…
A: Declare and initialize the five arrays given in the question, as static. Inside the arr() method…
Q: Write a C program that reads integers, finds the sum and the average of them. Assume that the input…
A: #include<stdio.h> float computeAverage(float sum,int counter){ return sum/counter;} int…
Q: Write a program that prompts the user for a sentence and display in new words. Your program should…
A: Below I have provided C++ Programming. Also, I have attached the screenshot of the code and output…
Q: Can you write a new code in Java language with the values I sent you, just like this output?…
A: Source code:- #include <bits/stdc++.h>using namespace std; int main(){ ifstream…
Q: Write a program called StudentTable that prints the below table. Use only print() or printf(). DO…
A: Code: #include<stdio.h>int main() { char h[4][50]={"Name","Lab","Bonus","Total"}; char…
Q: Write a program to use enumeration type to represent the seven colors of the rainbow, i.e. red,…
A: switch (choice) { case 1: cout << "Red color is chosen. The next color is…
Q: After Exception of following statements: int x, y; char ch; cin ignore (7,'2'); cin.get(ch); cin…
A: ignore() function is used which is used to ignore or clear one or more characters from the input…
Q: 1- Write a java Program to read a number from user and print full pyramid using numbers which will…
A: Refer to step 2 for the java program.
Q: 6. Write a program that (i) declares a string str_a (of size (LAST_FOUR_DIGITS_OF_YOUR_STUDENT_ID %…
A: Step 1: Accept a string from the user and store it in str_a. Step 2: Scan the characters of the…
Q: 1. Write a complete C++ program that lists all numbers that are perfect squares in a range. •…
A: Answer in step2
Q: 1. Write a complete C++ program that lists all numbers that are perfect squares in a range. •…
A: ALGORITHM:- 1. Generate the value of low between 50 & 200. 2. Generate the value of high between…
Q: Exercise 5: Write a Python program that reads from an input from user n student test scores in the…
A: Algorithm: - To Solve this problem we will mainly use the if-else condition inside the For…
Q: 1- Write a java Program to read a numberfrom userand print full pyramid using numbers which will…
A: A program using JOptionPane class to read the number and print the pyramid. Code for Java program…
Q: 2. Write a program that automates the table used by a surveyor to transform compass headings in…
A: Note: This code should be rewritten instead of copying to the compiler otherwise it will throw a…
Q: In the given code below we want to swap a and b. a -What is the problem with code b- Fix the code by…
A: Given Code always @ (posedge clk) begin a=b; b = a; end A) There is a problem with…
Q: IN C++ Create a task that takes a series of card numbers and checks that their total value is more…
A: Please refer below code and output: Language used is C++: #include <iostream>using namespace…
Q: Java program Part B: For Loop Program Write a program to compute the sum of the first N Fibonacci…
A: The java code along with the screenshot of code and output are given below.
Q: 2. Write a program that constructs a random telephone number of the form (XXX) XXX-XXXX and outputs…
A: As no language is mentioned I am doing is using JAVA. As the number is generated randumly So, It…
Q: in Java, Write a program that reads student scores, gets the best score, and then assigns grades…
A: Java program to determine the grade of a student corresponding to the score. Prompt user to enter…
Q: 4. (25) Write a Java program: (25 = 4(a) + 3(b) + 4(c) + 4(d) +3(e) + 3() + 4(g)) a. Randomly…
A: Kindly note: As per our company guidelines we are supposed to answer only first 3 sub-parts. Kindly…
Q: 5) Write a program that reads three numbers and prints "increasing" if they are in increasing order,…
A: """Program reads three number and prints increasing, decreasing or neitherbased in its values…
Program31.java
Write a
Program32.java
Write a program that prompts the user for any day of the week. Report the entered day as either a weekend day, or not. Use a switch and "stack" cases that require the same report as shown on page 103. Your program should handle bad inputs, too.
Program33.java
Write a program that generates a random Fahrenheit oral temperature between 92 and 108, inclusive. Print the temperature, and then report whether the temperature indicates a fever or not using a conditional operator as on page 105. An oral temperature above 100F is feverish.
Program34.java
Write a program that prints the ordinal for a random integer from 0 to 100, inclusive. Example ordinals might be 31st, 62nd, 43rd, 55th.
Trending now
This is a popular solution!
Step by step
Solved in 5 steps with 4 images
- ISP-Java Write a program whose input is two integers, and whose output is the first integer and subsequent increments of 10 as long as the value is less than or equal to the second integer. For coding simplicity, output a space after every integer, including the last. Ex: If the input is: -15 30 the output is: -15 -5 5 15 25 Ex: If the second integer is less than the first as in: 20 5 the output is: Second integer can't be less than the first.Write a program that displays the classic BINGO game, displays a BINGO card (5x5 square), and tests the bingo card for a winner via 2 users Steps: 1- Ask user 1 to enter 24 numbers between 10-40 no duplicates / check for range and repetition 2- Ask user 2 to enter 24 numbers between 10-40 no duplicates / check for range and repetition 3- Design 2 BINGO cards as you see below 4- Distribute the numbers onto the 2 cards with each user input with 0 in the middle 5- Display the 2 cards in 1 screen as you see below 6- Generate a random number between 10-40 no duplicates / check for range and repetition 7- Compare the random number with the numbers on the 2 cards 8- If the random number matches any number on each card, change the number on the card to 0 9- Check for winning cards 5 numbers in a row or column = 0 5 numbers in a diagonal = 0 all 4 corners of the card = 0 if any of the players won, display who is the winner and exit the program if the 2 players won, display both are the…Write a program in C that displays the classic BINGO game, displays a BINGO card (5x5 square), and tests the bingo card for a winner via 2 users Steps: 1- Ask user 1 to enter 24 numbers between 10-40 no duplicates / check for range and repetition 2- Ask user 2 to enter 24 numbers between 10-40 no duplicates / check for range and repetition 3- Design 2 BINGO cards as you see below 4- Distribute the numbers onto the 2 cards with each user input with 0 in the middle 5- Display the 2 cards in 1 screen as you see below 6- Generate a random number between 10-40 no duplicates / check for range and repetition 7- Compare the random number with the numbers on the 2 cards 8- If the random number matches any number on each card, change the number on the card to 0 9- Check for winning cards 5 numbers in a row or column = 0 5 numbers in a diagonal = 0 all 4 corners of the card = 0 if any of the players won, display who is the winner and exit the program if the 2 players won, display both are…
- Write a program that reads an unspecified number of integers and finds the ones that have the most occurrences. For example, if the user enters 2 3 40 3 5 4 -3 3 3 2 0 in one line in the terminal, the number 3 occurs most often and displays that number. If not one but several numbers have the most occurrences, all of them should be reported. For example, since 9 and 3 appear twice in the list 9 30 3 9 3 2 4, both occurrences should be reported. Note: Use dictionaries to store entries by keys and values, and complete the counting, swapping and sorting.Write a simple calculator which supports add subtract multiply and divide. Prompt the user for two numbers and an operation. Use number 1-4 for menu options. If divide is selected and the second number is zero, output an error message. If an invalid menu option is selected, output an error message. If all is well, perform the operation and output the result to one decimal. Please write in Java that results like test case examples. ThanksIn Coral Programing!! Write a program that takes in an integer in the range 20-98 as input. The output is a countdown starting from the integer, and stopping when both output digits are identical. Ex: If the input is 93, the output is: 93 92 91 90 89 88 Ex: If the input is 77, the output is: 77 Ex: If the input is not between 20 and 98 (inclusive), the output is: Input must be 20-98 For coding simplicity, follow each output number by a space, even the last one. Use a while loop. Compare the digits; do not write a large if-else for all possible same-digit numbers (11, 22, 33, ..., 88), as that approach would be cumbersome for large ranges.
- In java, create a program that will use a do while loop with a "yes/no" prompt. The program should include user input and output with getters and setters. Once the end of the loop is reached, ask the user if they'd like to do the program again. Answering "Yes" will start the program over again. Answering "No" will end the program. Answering with anything else will be an invalid input. Once the loop begins again, the program should also discard all previous inputs so that there won't be any overlapping. Use Scanner.nextLine();, it will help.Can you write a new code in Java language with the values I sent you, just like this output? There are two files named group1.txt and group2.txt that contain course information and grades of each student for each class. I will calculate each course average for each group and show in simple bar graph. Use "*" and "#"characters for group1 and group2, respectively. I will see the number -999 at the end of each line in the input files. This value is used for line termination and you can use it to verify that you have arrived at the end of the line. The averages of each group should also be calculated and printed at the end of the file. Group 1: CSC 80 100 70 80 72 90 89 100 83 70 90 73 85 90 -999 ENG 80 90 80 94 90 74 78 63 83 80 90 -999 HIS 90 70 80 70 90 50 89 83 90 68 90 60 80 -999 MTH 74 80 75 89 90 73 90 82 74 90 84 100 90 79 -999 PHY 100 83 93 80 63 78 88 89 75 -999 Group 2: CSC 90 75 90 75 80 89 100 60 80 70 80 -999 ENG 80 80 70 68 70 78 80 90 90 76 -999 HIS 100 80 80 70 90 76 88…IN Java: Complete main() to read dates from input, one date per line. Each date's format must be as follows: March 1, 1990. Any date not following that format is incorrect and should be ignored. Use the substring() method to parse the string and extract the date. The input ends with -1 on a line alone. Output each correct date as: 3-1-1990. Ex: If the input is: March 1, 1990 April 2 1995 7/15/20 December 13, 2003 -1 then the output is: 3-1-1990 12-13-2003 Use the provided getMonthAsInt() method to convert a month string to an integer. If the month string is valid, an integer in the range 1 to 12 inclusive is returned, otherwise 0 is returned. Ex: getMonthAsInt("February") returns 2 and getMonthAsInt("7/15/20") returns 0. provided code: import java.util.Scanner; public class DateParser { public static int getMonthAsInt(String monthString) { int monthInt; // Java switch/case statement switch…
- Write a C# program named TestScoreList that accepts eight int values representing student test scores. Display each of the values along with a message that indicates how far it is from the average. An example of how the results should be output is as follows: Test # 0: 89 From average: 6 Test # 1: 78 From average: -5 Also like: Test # 0: 74 From average: 13.375 Test # 1: 65 From average: 4.375Use Java Implement a game of Pig where the user plays against a "hold at 20 or goal" computer player that rolls until a 1 ("pig") is rolled, or the turn total is greater than or equal to 20, or the score plus the turn total is greater than or equal to 100. The first player is chosen randomly. An empty input (i.e., Enter) indicates that the user wishes to roll. Any entered line of non-zero length indicates that the user wishes to hold. Before the game, randomly select which player the user will be, and print the line "You will be player #.", where # is the user's player number. Then, print an instruction line "Enter nothing to roll; enter anything to hold." Before each turn, print a line with "Player 1 score: " and player 1's score. Print another line with "Player 2 score: " and player 2's score. Finally, print a line with "It is player #'s turn.", where "#" is replaced by the current player number. Play starts with player 1 and then alternates. For each roll, print a line with…C++ A robot is initially located at position (0; 0) in a grid [?5; 5] [?5; 5]. The robot can move randomly in any of the directions: up, down, left, right. The robot can only move one step at a time. For each move, print the direction of the move and the current position of the robot. If the robot makes a circle, which means it moves back to the original place, print "Back to the origin!" to the console and stop the program. If it reaches the boundary of the grid, print \Hit the boundary!" to the console and stop the program. A successful run of your code may look like:Down (0,-1)Down (0,-2)Up (0,-1)Left (-1,-1)Left (-2,-1)Up (-2,0)Left (-3,0)Left (-4,0)Left (-5,0)Hit the boundary! or Left (-1,0)Down (-1,-1)Right (0,-1)Up (0,0)Back to the origin! About: This program is to give you practice using the control ow, the random number generator, and output formatting. You may use <iomanip> to format your output. You may NOT use #include "stdafx.h".