1-Write an algorithm to get two numbers from the user (as inputs) and calculate the sum of two numbers and print out the result. (draw the flow chart)
2-Write an algorithm to get a number from the user and calculate the square of that number and print out the result.
1.
Algorithm:
1. Start
2. Input first number let it be A
3. Input second number let it be B
4. SUM = A + B
5. Display SUM
6. Stop
Flowchart:
2.
Algorithm:
1. Start
2. Input the number let it be A
3. SQR = A * A
4. Display SQR
5. Stop
FlowChart:
1-Write an algorithm to get two numbers from the user (as inputs) and calculate the sum...
4. Write the algorithm of a program that can get three different numbers from the user and find the sum of these three numbers. Display the sum. (5 marks) (CLO3:PLO3:03)
Help pls for assignment
2. Write an algorithm to display up to 10 user inputs 3. Write an algorithm to display print first 5 items in a collection. 4. Write an algorithm to read in 3 numbers. Display the largest number.
Write a MATLAB code that has two inputs from the user (two numbers) and display the summation result of these numbers?
Write a program which: - prompts the user for 2 numerical inputs - stores their two inputs in variables as floats - Use a while in loop to ask a user for a valid operation: (if the user's input operation isn't one of those listed above, instead print a message telling them so, and continue asking for the valid operation) - prompts the user for an arithmetic operation ( + - * / %) - stores the user's input as...
Using Matlab Write a program which will: a. Accept two numbers from the user m and n b. Define an array with the dimensions a(n,m) and fill it with random numbers in the range of -100 to 100 inclusive. c. Provide the user the following menu from which he can select: 1. Sum of all elements in the array. Print the result. 2. Sum of the element in a row that he’ll specify. Print the result. 3. Sum of the...
Write a script which asks the user to input numbers until the user inputs 0. Then the script should print only the positive numbers entered by the user, in reverse order E.G. if the user inputs '4, -1, 5, 2, -3, -8, 0', the script should print '2, 5, 4'. Please don't copy someone else's answer as they don't work.
2. Write a Marie program that accepts two positive (inputs) two integers and outputs the sum of both of the integers and all the numbers in between Write a Marie program that determines the largest of a series of positive integers provided by a user. The user will enter a -1 when she is finished. Up to 10 numbers will be provided by the user. Write a Marie program that accepts two positive integers, multiples them by repeated addition, and...
In Matlab, write a script which asks a user to input numbers until the user inputs 0. Then the script should print only the positive numbers entered by the user, in reverse order. For example, if the user inputs “4,-1,5,2,-3,-8,0” the script should print “2,5,4”.
Write a program that receives a series of numbers from the user and allows the user to press the enter key to indicate that he or she is finished providing inputs. After the user presses the enter key, the program should print the sum of the numbers and their average. >>> totalSum =0 >>> count=0 >>> while True: number=input("Enter a number or press enter to quit:") if number =="": break totalSum += float(number) count+=1...
Write a function to calculate the sum of the reciprocals of a series of odd numbers. The function will have one input and no output, with the input being the ending value for the series of odd values. Write the function definition statement Initialize a variable to zero. This variable will contain the sum of all the values. Create a for loop that loops over all odd numbers from 1 to the specified ending value. Inside the loop, add the...