Task 2: Find the terms of any linear sequence given by the rule Term = a*n + b, where a and b are integers specified by the user and n is a positive integer and print them in order (for example if the user inputs a=3, b=-4, the first few terms that should be printed are -1, 2, 5, 8, 11…). The user also will specify how many terms the program should print. In addition, the program should print the sum of terms found and a count of how many odd terms were found. display aid of a flowchart
Q: When giving the user a set of choices to choose from, should numbers be used? E.g. 1, 2, 3? If so,…
A: Using numbers such as 1,2,3 to choose a set of choices make it more sense from user point of view.…
Q: QI/ choose one of the questions- • a-Evaluate each of the following expressions, assuming in each…
A: A) a. m-8-n => 40-8-12 => 20 b. m=n=9 Here m and n will be assigned value 9 c. m%n =>…
Q: This is a segment of program, when it executed with multiple values for n and s the program displays…
A: Given code: #include <iostream> using namespace std; int main(){ int x, y; int f;…
Q: write the algorithm for the problem below. Suppose that h(t) = 0.12t4 + 12t3 - 380t2 + 4100t + 220…
A: C++ program to create a table of the height at time t for t = 0 to 24. Algorithm: Start In the…
Q: Problem #3: Write a program that reads the width, height and a character from the user, then…
A: As there is no programming language is mentioned we are writing this program in c++ Code…
Q: 2. Write a program that generates a two-column table showing Fahrenheit temperatures from -40F to…
A: The given program is in java.
Q: The programming language is C++, write a program for each items base on the given statement. 1.…
A: Code: #include <iostream>using namespace std; int main() { int grade, newGrade; cout <<…
Q: TASK 2 (OF 2) The day of the week for a given date can be determined using the following expression:…
A: Click on Developer tab From Code group, select Visual Basic click on insert
Q: Homework-4 Write a program read x value then compute S value from the following series: 1 (X – 1y +…
A: Note: Answering in python as no language is specified. Input to the Program : Four different values…
Q: Write a C++ program that displays a table of conversions from feet to meters. The program needs to…
A: C++ program that displays a table of conversions from feet to meters. Algorithm: Start prompt…
Q: : Find the even multiples of any number chosen by the user in a given range - the user should…
A: #!/bin/bash # Get number from the user to which the user wants to get even multiples read -p "Enter…
Q: Exercise Based on problem in examplel, represent the algorithm by using flowcharting technique.…
A:
Q: What answers do you get for below queries for given program. Program : vegetarian(jose).…
A: As i have read Bartleby guidlines i can provide answer of only 1 part of questions in case of…
Q: Accept two integers and determine of the values are equal, if the values are equal print” EQUAL…
A: Introduction of Program: The C++ program takes two integers as input from the user and if both…
Q: Problem 1 Write a program that removes all the punctuation marks except spaces from a given sentence…
A: C program is given below for removing all the punctuation marks except spaces from a given…
Q: Modify the guessing-game program of Section 3.5 so that the user thinks of a number that the…
A: Required: Modify the guessing-game program of Section 3.5 so that the user thinks of a number that…
Q: Write a program that calculates the amount of money a person would earn over a period of time if the…
A: Algorithm : Step 1 : declare variables. Step 2 : create object of scanner class to take input. Step…
Q: Question #1. Product in the Range [N...M] Write a Program that reads a starting number (N) and…
A: // C# program to print the product // of all numbers in range N and M using System; class GFG{…
Q: Task 3: Find the numbers that can be expressed as the product of two nonnegative integers in…
A: Solution :: Let's see first what is flowchart and its uses ?? Answer :: A flowchart is a picture…
Q: Task 1 Write a Python program that will ask the user to input a string (containing exactly one…
A: # As per our guidelines we are supposed to answer only one question. Kindly repost other questions…
Q: 3) Write an algorithm for a program that inputs the of grades of an arbitrary number of students and…
A: 1) Algorthm that inputs the grades of arbitary number of students and output highes grade Declare…
Q: Machine Problem No. 1 The results from the mayor's race have been reported by each precinct as…
A:
Q: The Fibonacci sequence is: 0, 1, 1, 2, 3, 5, 8, 13, … The first two terms are 0 and 1, and each term…
A: //Fibonacci series using the C++ #include<stdio.h> #include<iostream> using namespace…
Q: 3- Given S= 1 + 3! 5! ,correct the following program which describes the series S,. 7! 9! S=2; m=1;…
A: Error in the above program: Variable S's initial value should be 1 instead of 2. f = f*i will…
Q: The course grades of 75 students from 5 courses are given in the form of a table. Write an algorithm…
A: Step 1 : Start Step 2 : Declare the Arrays to store the Grades and Grade Averages as Integers. Step…
Q: MACHINE PROBLEM 2 Numerical Methods WRITE A COMPUTER PROGRAM USING ANY LANGUAGE OF YOUR CHOICE THAT…
A: Program: #include<iostream> #include<iomanip> #include<vector>…
Q: 2. Evaluate the following expressions for m = 6, n=2 b= 0, c = 0, d = 0, and e = 0 (i) a+=4+ ++m*n:…
A: After evaluation: (i) m=7 n=2 a=18 b=0 c=0 d=0 e=0 (ii) m=5 n=2 a=0 b=0 c=0 d=0 e=0…
Q: Write a program that displays a salary schedule, in tabular format, for teachers in a school…
A: The below given C++ program will obey the following rubrics: Including necessary header files. In…
Q: Q/ Write C+program to read a score of student and print the estimation to refer it. 100-90 Exaliant…
A: C++ Code: #include <iostream> using namespace std; int main(){ int score;…
Q: Draw a series of variable diagrams for the program below using the conventions of the Study Guide.…
A: Answer the above questions are as follows:
Q: Given a positive integer n, the following rules will always create a sequence that ends with 1,…
A: Algorithm: 1. input a number 2.Condition checking that is number must be greater than 1 3.number is…
Q: Task 11 Write a Python program that takes a number from the user and prints its digits from left to…
A: The programming methodology for the program is given by: Input the number in num variable using…
Q: The course grades of 75 students from 5 courses are given in the form of a table. Write an algorithm…
A: Step 1 : Start Step 2 : Declare the arrays of Integers to Enter The Course Grades and Course Grade…
Q: 2. Write an algorithm (pseudocode) that inputs three positive real numbers x, y, z and outputs the…
A: Psuedo code for positive real numbers as input: input first number(X) input second number(Y) input…
Q: IDENTIFY THE CALL STATEMENTS, ALGORITHM, AND LISTS IN THE CODE BELOW. #BMI Program def…
A: The call statements are printBMI(Imperialweight ,Imperialheight)…
Q: Play Yahtzee specs For this game, you will need no user input at all. Declare integer variables that…
A: how to find random number between 1-6. rand() returns a random number in range of 0 to a constant…
Q: Modify question 2 from Lab 2 such that if the value for Celsius is 100 or more, also display “Above…
A: Step 1: Program Approach:- (i)Define the one variable (ii)Its data type is an integer
Q: game #4 player 1 : rock player 2 : rock playerl = 1, player2 = 1 Notice this game scores didn't cha…
A: #include<iostream> #include<cstdlib> #include<ctime> int main(){ unsigned…
Q: The results from the mayor's race have been reported by each precinct as follows: Table 2: Results…
A: Actually, program is a executable software that runs on a computer.
Q: A business law class of 25 students takes a midterm exam that has 100 true- or-false questions. The…
A: We need four arrays in this problem. The array KOUNT stores the number of times a grade is achieved…
Q: Given a square matrix with elements 0 or 1, write a program to find a maximum square submatrix whose…
A: JAVA Program: import java.util.Scanner; public class Main { public static void main(String[]…
Q: Homework write a program that will add the terms of an infinite geometric series. The program should…
A: Here is the code with output:-
Q: QI/ Write C++ program to read a score of student and print the estimation to refer it. е.g: 100 - 90…
A: #include<iostream>using namespace std;int main(){ int x; cout<<"Enter your score:…
Q: Teachers in most school districts are paid on a schedule that provides a salary based on their…
A: I have provided solution in step2
Q: Question 1: Write a python program that takes two numbers (Integer) as inputs from the user.…
A: One program is asked in python programming language. Program prints one pattern using two inputs,…
Q: Task 12 Write a Python program which takes a number and prints the digits from the unit place, then…
A: Program description: n is the user input integer variable that stores the value of the number.…
Q: Write a program to do the following: (a) Display the table with appropriate labels for the rows and…
A: The given problem is to be solved in C++ where a 2D array will be used to store the given table. The…
Q: Draw the flow-chart of the algorithm that will ask the user to enter time in hours (24 hour format).…
A: if(time_in_hours >= 4 and time_in_hours <= 11) print("Morning") else if(time_in_hours…
Task 2: Find the terms of any linear sequence given by the rule Term = a*n + b, where a and b are
integers specified by the user and n is a positive integer and print them in order (for example if
the user inputs a=3, b=-4, the first few terms that should be printed are -1, 2, 5, 8, 11…). The user
also will specify how many terms the program should print. In addition, the program should print
the sum of terms found and a count of how many odd terms were found.
display aid of a flowchart
Step by step
Solved in 2 steps with 1 images
- Task 1: Find the even multiples of any number chosen by the user in a given range - the user should specify the multiples of which number they want to print and a minimum and maximum value. The multiples printed should be within the [minimum, maximum] range. For example, if the user chooses the number 7 and would like to print all even multiples in the [15, 60] range, the program should print all the even multiples that are bigger than or equal to 15 (minimum), but smaller than or equal to 60 (maximum). The program should keep a count of how many numbers were printed and should output that count, as well as the numbers. The output then, for the example given, should be 28, 42, 56, and the count should be 3. Shell scriptingExercise II Write a program that finds the positive integer solutions of the following equation ax³ + bx² + cx' + d = 0. The user enters the values of coefficients a, b, c and d. The program should test each integer starting from -50 to 50, and each time the equation is equal to zero, it prints its value as well as "is a solution". At the end, it displays the total number of positive integers found. Note that if the equation has more than one solution, the plural word “solutions" is used in the output. Sample run 1: Enter the coefficient of a, b, c, d: 1 -8.5 21 -13.5 1 is a solution 3 is a solution The equation has 2 integers as solutions Sample run 2: Enter the coefficient of a, b, c, d: 6 48 103.5 67.5 The equation has no integer solutions Sample run 3: Enter the coefficient of a, b, c, d: 1 -1 -12 0 4 is a solution The equation has 1 integer solutionFlowchart for this given task please and also please give a little explanation of how you did your flowchart, please. Task 2: Find the term of any linear sequence given by the rule Term = a * n + b, where a and b are integers specified by the user and n is a positive integer and print them in order (for example if the user inputs a=3, b=-4, the first few terms that should be printed are -1, 2, 5, 8, 11…). The user also will specify how many terms the program should print. In addition, the program should print the sum of terms found and a count of how many odd terms were found.
- • Task 1: Find the even multiples of any number chosen by the user in a given range - the user should specify the multiples of which number they want to print and a minimum and maximum value. The multiples printed should be within the [minimum, maximum] range. For example, if the user choses the number 7 and would like to print all even multiples in the [15, 60] range, the program should print all the even multiples that are bigger than or equal to 15 (minimum), but smaller than or equal to 60 (maximum). The program should keep a count of how many numbers were printed and should output that count, as well as the numbers. The output then, for the example given, should be 28, 42, 56, and the count should be 3.Problem Description: In the Whimsical Library, each book is enchanted with a magical code to ensure the protection of knowledge. The validation process for these magical codes involves a combination of mathematical spells. The validation process is described as follows: Take the sum of the digits at odd positions from left to right. Take the sum of the squared digits at even positions from left to right. If the absolute difference between the results from step 1 and step 2 is a prime number, the book code is considered valid; otherwise, it is invalid. Example 1: Consider the magical book code 86420137. Step 1. Take the sum of the digits at odd positions from left to right. 8+4+0+3=15 Step 2. Take the sum of the squared digits at even positions from left to right. 6^2+2^2+1^2+7^2=36+4+1+49 = 90 Step 3. If the absolute difference between the results from step 1 and step 2 is a prime number. 115-901 75 (not a prime number) Book code 86420137 is invalid. Example 2: Now, let's examine the…. Task 3: Find the numbers that can be expressed as the product of two nonnegative integers in succession and print them in increasing order. (For example, 30 is such a number as it can be written as the product of 5 and 6 (30=5x6), which are two numbers in succession.) The user should specify a maximum value and the program should print all said numbers smaller than or equal to that value. The program should keep a count of how many numbers were printed and should output that count ,as well as the numbers
- On one day a year a programming club at AOU hosts a tournament. Each entrant is recorded in the appropriate tournament category on arrival and is registered a corresponding level. Participants in level one will be entered in the basic training and competition; participant in level two and three will be entered in the intermediate training and competition; those in level 4 will be entered in the junior competition. ⦁ You are required to write an algorithm which is required to decide the appropriate category for the entrant; Display the entrant’s in a list for that category and output the corresponding level. Hint[The tutor will keep registering the students until he pressed -1 to stop and exit from the loop ] ⦁ Build your algorithm by OUbuild and provide screenshots for the output(Numerical) Write a program that tests the effectiveness of the rand() library function. Start by initializing 10 counters to 0, and then generate a large number of pseudorandom integers between 0 and 9. Each time a 0 occurs, increment the variable you have designated as the zero counter; when a 1 occurs, increment the counter variable that’s keeping count of the 1s that occur; and so on. Finally, display the number of 0s, 1s, 2s, and so on that occurred and the percentage of the time they occurred.The program in the Programming Example: Fibonacci Number does not check whether the first number entered by the user is less than or equal to the second number and whether both the numbers are non-negative. Also, the program does not check whether the user entered a valid value for the position of the desired number in the Fibonacci sequence. Rewrite that program so that it checks for these things.
- Q1. With Menu Driven Program Design a Calculator having all the main functions also use Math's functions. Q2. Write a program to find that a letter is vowel or not using If-else statement? Q3. Write a program that performs a survey on beverages. The program sholud prompt for the next person untila lookout value of -1 is entered to terminate the program. Each person participating in the survey should choose their favorite beverage from the following list? 1. Cofee 2. Tea 3. Coke 4. Orange Juice Q4. Given an integer n such as 1367. Write a program that computes the inverse of this integer as 7631. Q5. Write a program to print prime numbers within given range using while loop?Problem Descriptions: In this problem, your task is to write a program to find whether a user-entered 2-D point (P) lies (i) (ii) (iii) The circles are specified using their center coordinates and radii. See the illustrations below showing all three cases you need to consider: within both of the two given circles, within only one of those circles, or outside both circles (treat a point ON a circle as being inside the circle). Pis outside both circles Pis inside ONLY one circle Sample Outputs: Sample output #1 POINT MEMBERSHIP WITHIN TWO CIRCLES Circle 1: center at ( 6, -5 ) and radius: 3 Circle 2: center at ( 12, -7 ) and radius: 5 Please enter the x-coordinate of the test point: 8 -5 Please enter the y-coordinate of the test point: Point lies within both circles. Sample output #2 POINT MEMBERSHIP WITHIN TWO CIRCLES Circle 1: center at ( 6 , -5 ) and radius: 3 Circle 2: center at ( 12 , -7 ) and radius: 5 Please enter the x-coordinate of the test point: 12 Please enter the y-coordinate…Rent A Van wants a program that calculates the total cost of renting a van. Customers pay a base fee plus a charge per mile driven. Complete an IPO chart for this problem. Desk-check the algorithm using $50, $0.20, and 1000 as the base fee, charge per mile, and number of miles driven, respectively. Then desk-check it using your own set of data