guys can you please help me to to write a pseudo code for this program and write the code of the program in visual studio in.cpp.
compile the program and run and take screenshot of the output
and upload it. please help is really appreciated.
pseudo-Code for calculating the correct average of two numbers when values are initially set.
Declare number1,number2 as INTEGERS
Set number1 to 10
set number2 to 30
Declare average as float
Set avergae to (number1+number2)/2
Print the average to the console.
c++ code for calculating the correct average of two numbers when values are initially set.
#include<iostream>
#include<math.h>
using namespace std;
int main(){
int num1 = 10, num2 =30;
float average;
average = (num1+num2)/2;
cout<<"Average of numbers 10 and 30 is "<<average<<endl;
}

pseudo-Code for calculating the correct average of two numbers when values are to be given by user.
Declare number1,number2 as INTEGERS
Input number1,number2
Declare average as float
Set avergae to (number1+number2)/2
Print the average to the console.
c++ for calculating the correct average of two numbers when
values are to be given by user.
#include<iostream>
#include<math.h>
using namespace std;
int main(){
int num1 , num2 ;
float average;
// cout will the text into the console
cout<<"Enter the value for number 1 "<<endl;
//cin will takes the user input and assigns it to the given
variable.
cin>>num1;
// cout will the text into the console
cout<<"Enter the value for number 2"<<endl;
//cin will takes the user input and assigns it to the given
variable.
cin>>num2;
average = (num1+num2)/2;
cout<<"Average of numbers 10 and 20 is "<<average<<endl;
}
Your console will look like this after running the above program

Now Enter some value for number 1 and Tap Enter button

Now enter other value for number 2 and Tap Enter button

This is the Final Output.
A sample program on how to initialise a int, float, double, string variables.
#include<iostream>
#include<math.h>
#include<string>
using namespace std;
int main(){
int number = 1;
float numfloat = 1.2;
double numdouble = 1.00;
string str = "yourLabName";
cout<<"Printing integer "<<number<<endl;
cout<<"Printing float number
"<<numfloat<<endl;
cout<<"Printing double "<<numdouble<<endl;
cout<<"printing String "<<str<<endl;
}

If you left with any doubt .... feel free to ask.
guys can you please help me to to write a pseudo code for this program and...
please help!
Write a program that can be used as a math tutor for a young student. The program should display two random numbers to be added. The program should then pause while the student works on the problem. When the student is ready to check the answer, he or she can press a key and the program will display the correct solution. The output must be formatted correctly with the numbers aligned properly. You will build on this assignment...
To write a C++ program to find average of three integers using
functions
Objectives: To get familiar with functions in C++ Task 1: Study the working of user-defined functions in C++ Task 2: To write a C++ program to find average of three integers using functions Programming Instructions: Make new project (Visual C++ Empty Project) named lab6 and add a C++ file named lab6.cpp to this project. (Some IDE may automatically generate main.cpp or source.cpp, then you just rename it...
this should be a code for C++
the source code file so the program will operate as described below. These are the software requirements for the project. When the program runs, it shall display the text as shown on lines 1-11 in the example below. Next, it shall display a prompt message asking the user to enter his or her yearly salary. Next, it shall shall read the user's salary from the keyboard (in the example below, user input is...
I need this in Net beans and not Python. Part 1 - Pseudo-code Design and write the pseudo-code for the following Problem Statement. Problem Statement A company gives its employees an that will provide one of 3 results based on the following ranges of scores: Score Message on Report 90-100 Special Commendation 70-89 Pass Below 70 Fail Design a single If-Then-Else structure using pseudo-code which displays one of these messages based a score input by a user. Be sure your...
Directions: You are to write a C++ program that meets the instruction requirements below. Deliverables: · Your C++ source code file. (The file with the .CPP extension). No other files will be accepted. A screenshot of your program running. Program Instructions: Consider the following incomplete C++ program: #include int main() { … } 1. Write a statement that includes the header files fstream, string, and iomanip in this program. 2. Write statements that declare inFile to be an ifstream variable...
Write a C++ program that reads text from a file and encrypts the file by adding 6 to the ASCII value of each character. See section 5.11 in Starting out with C++ for information on reading and writing to text files. Your program should: 1. Read the provided plain.txt file one line at a time. Because this file has spaces, use getline (see section 3.8). 2. Change each character of the string by adding 6 to it. 3. Write the...
JAVA CODE This program causes an error and crashes. Compile and give it a test run, note the exception that is thrown. Then do the following to fix the problem 1. Write code to handle this exception 2. Use try, catch and finally blocks. 3. Display, the name of the exception 4. Display a message from the user about what happened. Here is the starting file BadArray.java: public class BadArray { public static void main(String[] args) { // Create an...
Can someone please help me with this problem? We are using
CodeWarrior to write this program in assembly language.
The array sample contains eight 8-bit signed binary numbers (integers) as shown below. Write a program which stores the negative numbers in the array nelements, computes the sum of the positive numbens to be stored in the variable psum and stores the number of the positive numbers in the variable pnumber. Note that a zero is ther positive nor negative. Your...
Topics: Arrays in C. For this assignment, you will write a C program that uses its first command line parameter to compute and display a histogram of characters that occur in it. Requirements: Your program must compile and run correctly using the gcc compiler on ale. You must write the corresponding function definitions for the following function prototypes: // set all elements of the histogram to zero void init_histogram(int histo[]); // construct the histogram from string void cons_histogram(char string[], int...
can someone please comment through this code to explain me
specifically how the variables and arrays are working? I am just
learning arrays
code is below assignment
C++
Programming from Problem Analysis to Program Design by D. S. Malik,
8th ed.
Programming
Exercise 12 on page 607
Lab9_data.txt
Jason, Samantha, Ravi,
Sheila, and Ankit are preparing for an upcoming marathon. Each day
of the week, they run a certain number of miles and write them into
a notebook. At the...