2. Construct a program where you deciare and initialize a constant variable, now try to reassign some value to that variable and notice what happens.
Q: Draw the flow diagram of the program that converts the number entered on the keyboard to base 10.
A: 1. get nnumber from keyboard 2. take mod of that number by 10, print mod 3. divide number by 10,…
Q: Give one good reason that you should not use global variables in a program.
A: Global Variables In computer programming, a global variable is a variable containing a global…
Q: Draw the flowchart for a program to calculate the total salary for Mohammed based on the number of…
A: I have given an answer in step 2.
Q: Question 2 Write a program which takes two float numbers from the user and check, if first number is…
A: algorithm:- (I) input first, second (II) if(first>second) { first=first+5;…
Q: . If we change the statement calc(x, y); to calc(1, 3) in the program, explain why would be an…
A: Define header file <iostream> which has the i/o operation files Define method calc with…
Q: Q2 : Draw the flow chart for the following program, and; What does this program print ( follow the…
A: Flowchart:
Q: Find the errors in the below program and rewrite the correct program.
A: Since the condition b == 100 is not assignment, and will return if value of b is 100, but since b…
Q: write a program to enter a letter and determine the letter is small or capital
A: The answer is given below.
Q: Draw flowchart and write C program to input the value of Basic salary and calculate the new salary…
A:
Q: Figure out the errors in the following program and correct them. Then, rewrite this corrected…
A: include header sections are specified inside angular brackets cout is used to print anything onto…
Q: Example-3: Write a program to calculate the Area and volume for a sphere. Sol. -The area of sphere =…
A: Given: The program is written in C language to find area and volume of sphere.
Q: 4. Write a program that prompts the user to enter a greeting and a name. The program should output…
A: The above program makes use of Scanner class defined in java.util package. This class takes in user…
Q: Explain how you would modify your program in Procedure , so that you have a digital clock, which…
A: .MODEL SMALL .STACK 100H .DATA PROMPT DB 'Current System Time is : $' TIME DB…
Q: Show the value that gets stored in the indicated variables(s) after the given sequence of statements…
A: x=45 code: #include <iostream> using namespace std; int main(){ int x = 15;switch (x){case…
Q: Question 2 Write a program which takes two float numbers from the user and check, if first number is…
A:
Q: Write a program c++ that prints the letter A instead of the number 65, without using variables or…
A: Sample Response: //C++ program to print A without using any variables#include<iostream>using…
Q: Example-3: Write a program to calculate the Area and volume for a sphere. Sol. -The area of sphere =…
A: Given: The program is written in C language to find area and volume of sphere.
Q: Given a and b are int variables and c is a double variable. The initial value for a, b, and c are 8,…
A: b++ is a post increment operation where the result in b updates after expression evaluation and thus…
Q: Write a program that prompts the user to enter a value for a variable named x and then prompts the…
A: Launch Matlab application. Click on the + New Script button Save the script file.
Q: mm yes program.py > fype your answer to "Summarise hair and eyes" here.
A: Lets see the solution in the next steps
Q: Q2 : Draw the flow chart for the following program, and; What does this program print ( follow the…
A:
Q: Write a program to enter the length and width of a rectangle and the radius of a circle. Assume the…
A: Start Input length Input width Input radius Calculate Area of Rectangle - Area of Square Display the…
Q: Example-3: Write a program to calculate the Area and volume for a sphere. Sol. -The area of sphere =…
A: Given: To write a program to calculate the area and volume for a sphere. The program is written in C…
Q: Show the value that gets stored in the indicated variables(s) after the given sequence of statements…
A: Control structures are used to determine the path of execution and control the execution of…
Q: Write the calculation program c++, the time it takes to refine the plants in the garden of the…
A: Given: Write the calculation program c++, the time it takes to refine the plants in the garden of…
Q: b) A sequence of numbers is given by the equation; Xn+2 = Xn+1 + xn Χη, ie if X1 and x2 = 1 then x3=…
A: Since 1st 2 terms are not mentioned, I am using c++. Code: x=zeros(1,12); x(1)=1; x(2)=1;…
Q: Q1: Draw the flow chart of a program that returns the sum of the even numbers between 5 and 75.
A: 1) Create a variable sum= 0 ,I=5 2) Run the loop from I=5 to I=75 Check if I is even…
Q: Define a variable and write down the rules for naming a variable.
A: variables means somethings that can be changed depending on conditions on or informations. it is a…
Q: Write a C++ program to input student name and marks of three subjects ,and calculate average, and…
A: Algorithm: 1. Declare score and grades. 2. Input score. 3. If score greater than 100 or less than 0…
Q: d) Read input an integer t from the user and print the value of the function t*sin(t) + cos(t) in…
A: Write a program in MATLAB to read input an integer t from the user and print the value of the…
Q: Write a program that converts a time from 24-hours notation to 12-hours notation. The following is a…
A: I have provided python code for given problem.
Q: Use python and write a function that takes a number as an input argument and returns True if the…
A:
Q: 2. Write an algorithm and draw a flow chart, and write Code in visual basic (using IF Block…
A: 1) Get input for value of x 2) IF x>0 z=x + 3e5 IF x=0 z=3/x + sin(x)…
Q: Q2 : Draw the flow chart for the following program, and; What does this program print ( follow the…
A: A diagram of the sequence of movements or actions of people or things involved in a complex system…
Q: 2. Write an algorithm and draw a flow chart, and write Code in visual basic (using IF Block…
A: I am giving most answers as per the Q/A expert community recommendation because the main question…
Q: Create a program that tells you how much money you have left after some expenses. Use these steps as…
A: To solve this problem,you have a function aaa which will prompt the user for expenses.After that…
Q: Write a program in which child take the input from user and parent is required to print that input?
A: #include <stdio.h>#include <stdlib.h>#include <pthread.h>#include…
Q: Q1) Write a C++ Program that input the distance in Centimeter, Meter, Kilometer, and then converts…
A: CODE IN C++ CONVERT CENTIMETER , METER, KILOMETER. #include <bits/stdc++.h> using namespace…
Q: Draw the flow diagram of the program that converts the number entered on the keyboard to the base…
A: Given: A program that converts any base to base 10. The base that s to be changed is entered by the…
Q: Q2 : Draw the flow chart for the following program, and; What does this program print ( follow the…
A: Given c++ program
Q: 2. Do a flow chart to ask for a person's age and show how many days old including leap years they…
A: Here our task is to develop a flow chart to calculate the number of days from the age of a person.…
Q: Create a pseudocode and flow chart for this program and write it on a clean sheet of раper Take a…
A: The flowchart presented here illustrates a simple questionnaire survey procedure. It shows the flow…
Q: b) Draw a flowchart for a program that arranging three alphabet characters in ascending (A-Z) order?
A:
Q: help me to do a c++ program using functions that will allow the user to enter 3 positive numbers…
A: Required: c++ program using functions that will allow the user to enter 3 positive numbers range…
Q: Find the errors in the program (highlight the place of the error and correct it):
A: Errors( ignoring empty space between lines while counting the line number):- Line 8- double height…
Q: In c++ The name and value of variable can change while the program is running? Do you agree with…
A: The name and value of the variable cannot be changed while the program is running.
Q: 4. Write a program to calculate the bottom surface perimeter, surface area and volume of a cylinder.…
A: You have not specified any language to write the code so, I have used C language to create the…
Q: Write a program to determine whether a year entered through the keyboard is a leap year or not. Also…
A: Program approach:- Using the necessary header file. Add your own birth year and other stuff below.…
Step by step
Solved in 2 steps with 1 images
- (Practice) An automobile travels at an average speed of 55 mph for 4 hours. Write a C++ program that displays the distance, in miles, the car has traveled after 1, 2, and so on hours until the end of the trip.Could you perhaps elaborate on what you mean by the word "local variable"?Program-specific variables are used in many phrases.4. Write a program that prompts the user to enter a greeting and a name. The program should output the greeting combined with the name, such as "How's it going, Steve?".
- C++ Programming Exercise: A real estate office handles, say, 50 apartment units. When the rent is, say, $600 per month, all the units are occupied. However, for each, say, $40 increase in rent, one unit becomes vacant. Moreover, each occupied unit requires an average of $27 per month for maintenance. How many units should be rented to maximize the profit? Write a program that prompts the user to enter: a. The total number of of units. b. The rent to occupy all the units. c. The increase in rent that results in a vacant unit. d. Amount to maintain a rented unit. The program then outputs the number of units to be rented to maximize the profit.Read the following program and answer the questions given at the end.Write a program that converts a time from 24-hour notation to 12-hour notation. The following is a sample interaction between the user and the program:
- Write a program to calculate velocity of a car when distance and time are given by the user.An oil slick occurs when an underwater refinery pipe ruptures, pumping oil into the water. The spilled oil sits on top of the water and causes a natural disaster. For simplicity, suppose that the oil sits on top of the water in the form of a circle. Write a program that prompts the user to enter the rate at which the ruptured pipe pumps oil (in gallons) per minute, the thickness of the oil on top of the water, and the number of days for which the area is covered by the spilled oil. The program outputs the spilled area (in kilometer) and the volume of oil (in gallons) on top of the water after each day.Please make a flow chart of this program
- Write a program that prompts the user to enter a value for a variable named x and then prompts the user to enter a value for y. Both prompts should use the Matlab input function. The program then checks if the value of x is greater than the value of y. If so, display a message to the command window telling the user that x is greater than y, otherwise display a message to the command window telling the user that y is greater than or equal to x. Use symbolic expressions and the subs function to determine the value of E in ? = ? ? 2 when m is 10. Note that c is approximately 186,000 miles per second. You must substitute in values for both m and c. Your answer should be: 3.4596e+11 aka 345960000000I am struggling with this types of question because I don't understand it, can you please answer the question and can you be very specfic with it.question: What is the output of the program?This program includes a number of int variables: a, b, c, d, e, i, j, and y. Which of these variables could be printed by the first println statement? Which of them could be printed by the second println statement? Which of them could be printed by the third println statement? Which of them could be printed by the fourth println statement? Which of them could be printed by the fifth println statement? Which of them could be printed by the sixth println statement?