program takes any two numbers does the add, subtraction or multiplication operations. The block needs to be ed for any set of numbers. hich block of the program matches this situation? a. Re-use Execution O b. Repeated Execution O c. Input Block O d. Conditional Execution
Q: What is the output of the following code: int a = 5, b = 10, c = 15; a = 3 * 7+9; b=b+71 * 7; c = a…
A: Answer: Option d Compilation error Here, &b is used. So There is invalid conversion from int* to…
Q: As input, enter two non-negative number sequences in increasing order (the numbers entered are…
A: Code Screenshot:
Q: Q1: Write JS Program to get the following output (use while loop in your answer) Numbers in Loop The…
A: let i=0; initialize i with 0 while loop syntax while(<condition>) {…
Q: What's wrong with this code? i=31 whileți<=50): printți) A There is a problem with the…
A: The answer is given below:-
Q: Q25. Write about the following, (a) Block codes (b) Convolutional codes (c) Hamming distance.
A: The Answer is in Below Steps
Q: What is the value of temp and n after the executions of the following code? assume user inputs…
A: Required:
Q: Question 3 Write a program that reads a positive integer number N in the range () <N < 19. If N is…
A: Code copy: import java.io.*; import java.util.Scanner; class Line { public static void main(String…
Q: 3. Write a code in AVR to load the value $15 into ocation $67 and add it to R19 five times and place…
A: Check the solution of 3 below.
Q: 10 int x=1, y=2; 11 12 cout <<x <<*"«y«\n*; Write one line of code for line 11 which uses prefix or…
A: //code for postfix #include <iostream> using namespace std; int main() { int x=1,y=2;…
Q: 02 (A):- What are the output from the C++ codes segments below? (Answer Two Only) 1- {int x=10;…
A: Here we have int x=10; then while(x>5); in this we use while loop and terminate it. this will…
Q: Consider the following program and calculate the software matrix n, N, V, D, E var a, b, c, d, m:…
A: Solution a:= a+a c:= c*d b:= b+b m:= a+b-c Python program to calculate the matrix. We need a…
Q: Given initial values of x and a code: and count count+=y; if (count 3 X--; else X++; Give the value…
A: Given x=2,y=1,count=2 count =count+y=2+1
Q: 9. Modify the given JS code to find the number of iterations of the loop given below, for (let i =…
A: To find the number of iterations of the given loop, we need a counter variable whose initial value…
Q: 1. Write a function which takes an input 'n' and calculates the sum of the first n natural numbers…
A: The requested Matlab program is provided in the next step by using a for loop and function.
Q: Q11 Write oop program to read 10 numbers and find the summation of first five numbers, and…
A: Note: we are only allowed to solve one question in one post. I am solving the first on here. To get…
Q: You are tasked with programming the following summation: 72 i=1 A co-worker has suggested the…
A: Corrected Code: from math import *x = 5y = [1, 2, 3, 4]prod = 1for i in range(1, len(y)+1):…
Q: Q2) Write a program to compare two numbers stored at AX and BX. If AX is greater than BX store FFH…
A: #include<stdio.h> int main() { char AX[3],BX[3],value; char CX;…
Q: Show the errors in the following code: (a) count = 0while count < 100:print(count) (b) count =…
A: All the given program code contains indentation errors. a) When we run the given program code the…
Q: 13. Write a program that reads in two integers and determines and prints if the first is a factorial…
A: Required: A program to read two integers and check if the first is a factorial of the second or not.…
Q: As input, enter two non-negative number sequences in increasing order (the numbers entered are…
A: I have provided PYTHON CODE along with CODE SCREENSHOT and OUTPUT…
Q: which block completes the code to generate 'Remainder: 0.0' as output? (replacing the XXX) using:…
A: '''First lets analyze the given code with each option'''def Remainder(a, b):#funciton takes, a,b as…
Q: What is the value of j after executing the following code: for j in range (50, 200, 3): print ("x")…
A: Loop in Python: A loop is a block of statements or code that keeps on executing repeatedly till a…
Q: 6) Update the below code to output the values of i (from 120 to 0) in decreasing order, but three…
A: Here, we are going to write a java code which will print numbers from 120 to 0 and three numbers per…
Q: PROBLEM: Create a program that will ask to fill in two square matrices and perform matrix…
A: Declare two matrix for multiplication and one for result Declare 3 loop variables and 1 for…
Q: 10. a) *Write a program to multiply ex6398 with ex1DFE and store the result in R10. b) What are the…
A: Part A) MOV R0, #0x6398 MOV R1, #0x1DFE MUL R2, R0,R1 STR R2, [R10]
Q: What is the output of the following code: int a = 5, b – 10, c = 15; a = 3 * 7+ 9; b-b+71 * 7; c =a+…
A: Here initially a=5 b=10 c=15 Then a=3*7+9; => 21+9=30 Then b=b+71*7=10+497=507 Then…
Q: Q1: Write A Program To Print The Multipliers Of 6 From 12 To 60, Using Do While.
A: 1.Start 2.Declare variables of data type integer i,j and initialize i to 12 ,j to 60; 3.Use Do while…
Q: Asks from the user to enter an array of characters(strings/texts) and terminates (user input) ONLY…
A: I give the code in C along with output and code screenshot
Q: please solution this question ProgramDebugging: Debug the given program to move data 23h into…
A: Given program: RETMON EQU OFOOOH 100H START MOV A, 26A LCALL RETMON
Q: 6- Using g(p) =p³ + p² + 1, find the output codeword for [D]=[0011] and [D]=[0010]
A: 1) Convert the polynomial into binary form. g(p) =p3+p2+1 [G] = [1101] 2) Add r 0's as LSB to data…
Q: 5. Given variables int areaBound and int sum, write a snippet of code that assigns to sum the result…
A: Here in this question we have asked to write a snippet of code that use while loop and Initially…
Q: ——— Rem (20, 6), returns the output<< 20 error O 3 120 2 O
A: The answer will be 2(option 5) Explanation:- Rem() function The Rem() function means remainder after…
Q: Q6) Write a program to count the number of ones in AX, store the number of ones in BL.
A: Please give positive ratings for my efforts. Thanks. ALGORITHM Step I : Initialize the data…
Q: Q Write a program to initialize a block of memory starting at BA00OH with English alphabet (A to Z)…
A: Given:
Q: 1.Suppose you want to ask the user of your program to enter any character indicating an…
A: PROGRAM CODE: #include <iostream> // include header file for input output…
Q: Q2\ Write a complete C++ program that shows the following output for a different number of rows…
A: According to the given question, the proper solution is given below:
Q: (2) Show the argument below is invalid (Ar) → ¬s s V pAm .S m
A: Task : Given the set of premises and the conclusions. The task is provide the proof of invalidity.
Q: Answer the following questions regarding execution of loops. Assume that the code below is executed…
A: 0x0001 = 1 in decimal 0x1000 = 255 in decimal kk=1 mm=255
Q: Complete the C++ function given below: int evenDigits(int n){ I/returns the number of even digits in…
A: Given : A C++ function to find the number of even digits in a number passed as arguement.…
Q: The code is not producing this correct output. What could be wrong? Multiply.cpp: In function…
A: #include<iostream> using namespace std; int main(){ string head1 = "Number: "; string…
Q: Given the following code segment: char a = ‘H’; char *pt = &a; printf (“%d”, *pt); what is the…
A: Answer: 72 Explanation: char a = 'H'; This line stores the ASCII value of H to the variable a. ASCII…
Q: H.W: - Write a program to calculate the following function fx for n that is given by the user. in…
A: Note: since value for z , a, x is not defined so. we assume our own value. you can you use any…
Q: PROBLEM: Create a program that will ask to fill in two square matrices and perform matrix…
A: The program is written in C++. Check the program screenshot for the correct indentation. Please…
Q: Question 3 Create a program by using a loop and display the output of the following multiplication…
A: Here we used for loop, where i start from 1 to 12 and j start from 4 to 6
Q: As input, enter two non-negative number sequences in increasing order (the numbers entered are…
A: in the following section we will solve the problem in details
Q: 9. Use loop to calculate the summations of the following series for given values of x and (i) 4 –…
A: 9. Write a program that will find the value of following series: (i) 4 - 4/3 + 4/5 - 4/7 .... nth…
Q: How ma
A: Explanation The try block lets you test a block of code for errors. The except block allows you…
Q: What should be in ? block to compute the sum of even numbers from 0 to the largest even number that…
A: Initially, i is assigned to 0
Q: 4. Consider the following code. What prints? Print(str(25.37) A. 25.37 В. 26 C. 25 D. 25.3
A:
Step by step
Solved in 2 steps
- 4. Odd-Even-inator by CodeChum Admin My friends are geeking out with this new device I invented. It checks if a number is even or odd! ? Do you want to try it out? Instructions: In the code editor, you are provided with a function that checks whether a number is even or odd. Your task is to ask the user for the number of integer, n, they want to input and then the actual n number values. For each of the number, check whether it is even or odd using the function provided for you. Make sure to print the correct, required message. Input 1. Integer n 2. N integer values62. State true or false: If I = read(Q) and J = write(Q) then the order of I and J does not matter. a. True b. False c. May be d. Can't sayObjective: Implement programs involving the use of while, do..while and for loop statement. Problem: Write a program to display the output below:
- 61. State true or false: If I = read(Q) and J = read(Q) then the order of I and J does not matter. a. True b. False c. May be d. Can't sayplease do not use java Your program must use the following functions: printHeader(…): prints the two lines header of the table shown in the sampleoutput getData(…): receives a string representing line of text read from file. Itvalidates and returns name, job code and days worked, and a Boolean value ofTrue of the line contains valid data or False if the line contains faulty data. computeSalary(…):receives the job code and days worked and computes and returnsthe employee salary main():Opens input file for reading, reads data from file, calls variousfunctions and prints resultsProgram this
- 6. Find the errors from the following code. a. T=[a,b,c] printlh (T) b. for i in 1 to 100 : print (1) c. i=10 while [ib) print (a): else if (a幻令ll イ1:EY 9051aa5b780a24e112042a7f3fd8fe... 5 من 7 Homework 3: Write a program in c language to calculate two real numbers. The operation you are going to used are "add, subtract, multiple and division" and it is going to be optional to calculate the two numbers separately at each time you are going to execute the program. After you execute the program separately at each time your run the program the output look like below: Al-Fa amine Methedel Enter Enter Enter Enter + to add betveen tuo nunbers - to subtract betueen tuo nunbers - to multiply betueen tuo nunbers / to divide betveen tuo nunbers Enter the operat ion i+ Enter the ist nunher :2.3 Enter the 2nd nunber :5.6 The result is 7.900 Press any key to cont inue. - OR Enter Enter Enter Enter • ta add hetueen tuo nunbers - to subtract betueen tuo nunbers - to nultiply betnen tuo I to diuide betueen tuo nunbers Enter the operation :- Enter the ist nunber :2.3 Enter the 2nd nunber 15.6 The result is -3.308 Press any key to cont3. Odd-Even-inatorby CodeChum Admin My friends are geeking out with this new device I invented. It checks if a number is even or odd! ? Do you want to try it out? Instructions: In the code editor, you are provided with a function that checks whether a number is even or odd.Your task is to ask the user for the number of integer, n, they want to input and then the actual n number values. For each of the number, check whether it is even or odd using the function provided for you.Make sure to print the correct, required message.Input 1. Integer n 2. N integer values Output Enter n: 5Enter value #1: 33 is oddEnter value #2: 66 is evenEnter value #3: 44 is evenEnter value #4: 11 is oddEnter value #5: 33 is odd1. Can main be called recursively? Write a simple program that counts and shows the number of times the recursive main is called till infinity. (write very short code) 2. Write a program that converts integer Fahrenheit temperatures from 0 to 212 degrees to floating-point Celsius temperatures with 3 digits of precision. Perform the calculation using the formula 5x(Fahrenheit- 32) Celsius = The output should be printed in two right-justified columns of 10 characters each, and the Celsius temperatures should be preceded by a sign for both positive and negative values.10) Write a program that calculates and returns the sum of 1 to n in steps of 2, where n is an argument passed to the function. For example, if 11 is passed, it will return 1 + 3 + 5 + 7+9 + 11. Do this using for loop.Homework-1-Q 2021.pdf 4 من 5 Al-Farabi University College Computer Programming Methodology Department of Computer Engineering Dr. Hussein Muzahim Aziz Basi ylallt First Year 2020-2021 AL-FA RABI UNIVERS TY COLLIG Homework 3: Write a program to calculate two real numbers. The operation you are going to used are "add, subtract, multiple and division" and it is going to be optional to calculate the two numbers separately at each time you are going to execute the program, After you execute the program separately at each time your run the program the output look like below: • to add betveen tuo nunbers - to subtract bet veen tuo nunhers * to nultiply betveen tuo nunbera - to diu ide hetveen tuo nunbers Enter Enter Enter Enter Enter the operation i+ Enter the Ist nunher :2.3 Enter the 2nd nunber :5.6 The result is 7.980 Press any ke y to continue . • -- OR Enter Enter Enter Enter to add betveen tuo nunbers - to subtract betueen tuo nunbers - to nultiply betueen tuo nunbere to divide betueen…SEE MORE QUESTIONS