3. Write the pseudocodes/algorithm for the given questions. a. ABC bank offers 5% discount if payment is made within 10 days after notice. No discount if the payment is made after 10 days. b. A program receives input of an integer number. This number is then to be multiplied by numbers from 1 to 12. The result for each multiplication is printed.
Q: iii) Take input two integers a, b from the user and print "Yes" if both of them are equal, else…
A: Write a Python program to take input two integers a, b from the user and print "Yes" if both of them…
Q: Take user input for a sentence (character by character) and count total number of vowels both…
A: NOTE: SINCE THE LANGUAGE OF THE CODE HAS NOT BEEN MENTIONED, I HAVE USED PYTHON FOR THIS QUESTION…
Q: int i,j,k,x=0; for (i=0;i<5;++i); for (j=0;j<i;++j){ k= (i+j-1); if(k%2=0) x+=k; else if(k%3==0)…
A: The technique of identifying and removing the errors or mistakes from program or code. The answer is…
Q: 1. Final Enrollment Fee by Jemar Jude Maranga Write a program that will take as inputs the…
A: The above question is solved in step 2 :-
Q: 1- Write a program to find the average of 50 numbers and print the result. 2- Write a program to…
A: program for average of 50 number : #include <iostream> using namespace std; int main() {…
Q: Run the following Program 12.5 and answer the following questions. [Laksanakan Program 12.5 berikut…
A: Required:
Q: 5. Read input a string from the user and compute the count of characters '+' and '-' in the output.
A: Write a C++ program to read input a string from the user and compute the count of characters '+' and…
Q: Exercise 5: Modify the program convert.py (from exercise 1) so that it computes and prints a table…
A: print table of celsius temperature and fahrenheit equivalents every 10 degrees from a degree to 100…
Q: Solve this question with steps please. The subject is programming in c. Write the algorithm that…
A: Algorithm: Algorithm is a set of rules to be followed while solving problems or while performing…
Q: (Use Dev C++) Write a program that inputs three integers from the keyboard and prints the sum,…
A: Include all the required headers in the program. Declare all the required variables. Prompt to take…
Q: Program to read and a number from user and print the series 1+2+......+n= Use n = 10
A: Given: Program to read and a number from user and print the series 1+2+......+n= Use n = 10
Q: The output of the following C++ program is ;int a=5, b(3) int c{2} ;int result ;a = a + b :result =…
A: Here a=5, b=3 and c=2
Q: Determine the output of the given program segment. Assume the following initialization: int a = 2, b…
A: Output of the given program segment: b = 2
Q: 3x4 sin(180x) + 4x3 cos(90x) + x2 sin(tan(45)) + 7x + 9cos(90x2 ) implenment this equation into…
A: We need to write a program to implement the given equation, where x is entered by the user. The…
Q: Exercise 1: (Algorithms and Flowcharts) 1. For Multiplication of two numbers and display its…
A: ALGORITHM:- 1) Start 2) Accept Number one 3) Accept Number two 4) Multiply both the numbers 5) Print…
Q: The perimeter P and the AREA of a triangle whose sides have lengths a,b.c are given P= a+b+c and…
A: We are going to write a pseudocode and an actual program to solve the given problem.
Q: Find the error in the following code. x=-10:1:10:y=-10:2:10: plot(x,y) No error Syntax of plot is…
A: x = -10:1:10; y = -10:2:10; plot(x,y)
Q: Question No:3 Part: A. Write an algorithm to input three different numbers, and then output the…
A: Algorithim is step wise explanation of a problem. An algorithm must be unambiguous ,has finite steps…
Q: Q3/B/ Write a program in C++ to read an integer number then find the area or circumference of a…
A: Since Algorithm is already given in the problem, I am not writing it. Program: #include…
Q: 7. Read input a string from the user and compute the sum of the count of characters '(' and ')' in…
A: #include <iostream> #include <conio.h> #include <stdio.h> using namespace std; int…
Q: Q5: A/ Use input function to write a computer programming to test the weather state according to a…
A: Solution: The code for given questions is provided below. Here the variable 'x' is considered as…
Q: Read in 5 numbers from the keyboard and, if any of the entered numbers is < 0, then print out…
A: Pseudo code is given below to read five numbers from the keyboard and print “Negative” if the number…
Q: Q1. Write the algorithm to evaluate a Postfix expression? Q2. Show the evaluation of the given…
A: 1) To store a operands create a stack. 2) Now scan the expression, i)if it is operand push it into…
Q: Q1-A- writ a program to input First 10 odd Numbers. Then find their summation (use for... next…
A: The first odd number is 1 Then we have to count for 10 times in loop Adding odd number to sum
Q: 1. If a=1, b=2, and c=3, what are the values of a, b and c at the end of the following program…
A: As per our guidelines we are supposed to answer only one question. Kindly repost other questions as…
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: Write an algorithm, pseudocode and flowchart for the following problem. 2. To calculate the gross…
A: - Input the Basic salary - if basic salary is greater than 5000 then, Da = 110 % hra = 20 %…
Q: Q1: Write an algorithm that receives a number, n, as its input which calculates the following…
A: Algorithm: It is a set of instructions for solving a problem.
Q: 4. Define the function, print_hello(n) with a loop to print "Hello World" n times to the console.…
A: Write a Python program to define the function, print_hello(n) with a loop to print "Hello World" n…
Q: Write the MATLAB program to enter a number and calculate its square root if it is positive or zero…
A: Write the MATLAB program to enter a number and calculate its square root if it is positive or zero…
Q: Determine the output of the given program segment. Assume the following initialization: int a = 2, b…
A: Given Question: Give the output of the given code segments.
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: function answer - f() answer - 7; end > x - f () ; O f(7) O ans O 7 error
A: The answer is
Q: A palindrome is a word or a phrase that is the same when read both forward and backward. Examples…
A: code:- #include <iostream> #include <string> using namespace std; int main() {…
Q: Use C++ coding A palindrome is a number or a text phrase that reads the same backwards as forwards.…
A: PROGRAM CODE: #include <stdio.h> int main() { int n, a, b, c, d, e; int digit = 0;…
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: Determine the output of the given program segment. Assume the following initialization: int a = 2, b…
A: Given code is initialization: int a = 2, b = 4; if (b%a==0) { cout<<b<<" is even"; }…
Q: Question 24 Consider the pseudocode below: set a variable X to 14 set a variable Y to 0 while (X is…
A: Given pseudocode: set a variable X to 14 set a variable Y to 0 while (X is smaller than 100) set X =…
Q: Write C++ program to read two numbers and print multiple if the one of two numbers are multiple of…
A: Hey, since there are multiple questions posted, we will answer first question. If you want any…
Q: The program below computes the maximum exam mark for multiple students. The user enter student name…
A: Program: name = input ("Enter student name: ") while name != "": max = float (input…
Q: 11: series.cpp) Write a program that will add the terms of an infinite geometric series. The program…
A: #include <iostream>#include <bits/stdc++.h>#include <cstdlib>using namespace std;…
Q: Q6. Using variables NERD, DESIGNER, FAILURE and STUDIED, write a Boolean expression that is 1 for…
A:
Q: 02: Write program to read in the values of a, b, c then compute the root values (x) of the equation:…
A: Note: Answering the question in C++ as no programming language is mentioned. Task : Input a, b, c.…
Q: Take user input for a sentence (character by character) and count total number of vowels both…
A: Input character by character into a string till user moves to new line Compare each character and…
Q: average(double X, double y, double 2), returning he average of the arguments
A: Given 1. Write the following methods and provide a program to test them . b. double average(double…
Q: Assume the RIMS environment for exercises below. Write C statements that set B to the reverse…
A: RISM( Repertoire International des Sources Musicales) Repertoire International des Sources…
Q: Input 10 integers and determine how many are negative, the average of all positive, how many zeroes…
A: #include <stdio.h> int main(){ int arr[10]; printf("\nEnter 10 integers:\n");…
Q: Question 5) Answer A and B. A- Write a program to check the entered number by user whether it is…
A: A number is said to be positive if the number is greater than or equal to 1. Similarly, a number is…
Q: 8. Sum or Difference by Jemar Jude Maranga There are 2 integer inputs, num1 and num2. The program…
A: I have provided C CODE along with CODE SCREENSHOT and 2 OUTPUT SCREENSHOTS
Step by step
Solved in 3 steps
- Determine the output of the given program segment. Assume the following initialization: int a = 2, b = 4; if ( a-b>=0 ) { c=pow(b,2); cout<<b<<” raised to 2 is ”<<c; } else { c=pow(a,2); cout<<a<<” raised to 2 is ”<<c; } What is the output?Determine the output of the given program segment. Assume the following initialization: int a = 2, b = 4; if ( a > b||a – b < a ) { b - =a;cout<<b<<”=“<<b; } else { b++;cout<<b <<”=”<<b; }3. Find the error in the given code to print the message "Debugging Exercises." In the output. #include <stdio.h>int main(){ print "Debugging Exercises." return 0;}
- Exercise 1: (Algorithms and Flowcharts) 1. For Multiplication of two numbers and display its result.1. Write a program that converts the angle from degree to radian and displays each value. by using c++ 2. Write a program that inputs a sentence from the user and counts the number of words and characters in the sentence. by using c++Define function print_popcorn_time() with parameter bag_ounces. If bag_ounces is less than 3, print "Too small". If greater than 10, print "Too large". Otherwise, compute and print 6 * bag_ounces followed by "seconds". End with a newline. Remember that print() automatically adds a newline.Sample output with input: 742 seconds
- Define function print_popcorn_time() with parameter bag_ounces. If bag_ounces is less than 3, print "Too small". If greater than 10, print "Too large". Otherwise, compute and print 6 * bag_ounces followed by "seconds". End with a newline. Remember that print() automatically adds a newline. Sample output with input: 7 42 secondsWrite oop program to read 10 numbers and find the summation of first five numbers , and multiplication of second five numbersC program that will print countdown from 10 to 1 and will print HAPPY NEW YEAR after.