I need help coding something in C++ from lecture

Main FIle
mycode.cpp
#include <iostream>
#include "my_add.h"
#include "my_sub.h"
#include "my_div.h"
using namespace std;
// Function prototype (declaration)
int my_add(int, int);
int my_sub(int, int);
int my_div(int, int);
int main()
{
int x, y, sum,sub,div;
cout<<"Enters two numbers: ";
cin >> x >> y;
// Function call
sum = my_add(x, y);
cout << "Sum = " << sum <<endl;
sub = my_sub(x,y);
cout << "Sub = " << sub<<endl;
div = my_div(x,y);
cout << "Div = " << div<<endl;
return 0;
}
-----------------------------------------------------------------------------------------------------------------------
Save this file name my_add.h
#pragma once
int my_add(int x, int y);
-----------------------------------------------------------------------------------------------------------------------
Save this file name my_sub.h
#pragma once
int my_sub(int x, int y);
-----------------------------------------------------------------------------------------------------------------------
Save this file name my_div.h
#pragma once
int my_div(int x, int y);
-----------------------------------------------------------------------------------------------------------------------
// Function definition... Save this file name my_add.cpp
#include <iostream>
#include "my_add.h"
using namespace std;
int my_add(int x, int y)
{
int my_add;
my_add = x + y;
// Return statement
return my_add;
}
-----------------------------------------------------------------------------------------------------------------------
// Function definition... Save this file name my_sub.cpp
#include <iostream>
#include "my_sub.h"
using namespace std;
int my_sub(int x, int y)
{
int my_sub;
my_sub = x - y;
// Return statement
return my_sub;
}
-----------------------------------------------------------------------------------------------------------------------
// Function definition... Save this file name my_div.cpp
#include <iostream>
#include "my_div.h"
using namespace std;
int my_div(int x, int y)
{
int my_div;
my_div = (x + y)/2;
// Return statement
return my_div;
}
I need help coding something in C++ from lecture Create a separate file called mycode.cpp and...
Please Use C++ for coding
. . Note: The order that these functions are listed, do not reflect the order that they should be called. Your program must be fully functional. Submit all.cpp, input and output files for grading. Write a complete program that uses the functions listed below. Except for the printodd function, main should print the results after each function call to a file. Be sure to declare all necessary variables to properly call each function. Pay attention...
Description: Create a program called numstat.py that reads a series of integer numbers from a file and determines and displays the name of file, sum of numbers, count of numbers, average of numbers, maximum value, minimum value, and range of values. Purpose: The purpose of this challenge is to provide experience working with numerical data in a file and generating summary information. Requirements: Create a program called numstat.py that reads a series of integer numbers from a file and determines...
I am in C++ programming, I need help with this assignments. The answer in this assignments when I look for it it doesn't work in my visual studios. Can you please help me? I hardly have C in the class, if I fail I will fail the whole class and repeat this class again. The file named Random.txt contains a long list of random numbers. Download the file to your system, then write a program that opens the file, reads...
Write a program in C++ that reads in integer numbers from a file called scores.txt until the sentinel value -999 is read. The program should then output the total and average of the numbers read and output each of the numbers incremented by the overall average to a file called or scoresout.txt along with the sentinel value of -999 at the end So if 10, 20, 30 and -999 are read in then the program would display a total of...
Note: The order that these functions are listed, do not
reflect the order that they should be called. Your program must be
fully functional. Submit all .cpp, input and output files for
grading.
Write a complete program that uses the functions listed below.
Except for the printOdd function, main should print the results
after each function call to a file. Be sure to declare all
necessary variables to properly call each function. Pay attention
to the order of your function...
C++
This week, you are to create two separate programs, first using a simple array and the second using a 2D-array (matrix). [Part 1] Write a program that accepts exactly ten (10) integer numbers from the user and stores them in an array. In a separate for-loop, the program then goes through the elements in the array to print back: (i) The sum of the 10 numbers, (ii) the minimum value from the 10 numbers, and (iii) the maximum value...
PYTHON CODING HELP: BELOW ARE THE STEPS I NEED HELP WITH PLEASE. :) First create a text file named "items.txt" that has the following data in this order: Potatoes Tomatoes Carrots ... and have it be in the same directory as the Python program you are coding for this assignment. IMPORTANT: Your program should work with any size file. It should work with 100 items listed or with no items in the file! Write a Python program that ... 1....
Write a complete program that uses the functions listed below. Except for the printOdd function, main should print the results after each function call to a file. Be sure to declare all necessary variables to properly call each function. Pay attention to the order of your function calls. Be sure to read in data from the input file. Using the input file provided, run your program to generate an output file. Upload the output file your program generates. •Write a...
use MatLab to answer these questions
1. (10 points) Create an m-file called addup.m Use a for loop with k = 1 to 8 to sum the terms in this sequence: x(k) = 1/3 Before the loop set sumx = 0 Then add each term to sumx inside the loop. (You do not need to store the individual values of the sequence; it is sufficient to add each term to the sum.) After the loop, display sumx with either disp()...
I need help with a javascript assignment: Write a program called sum_number.js, that calculates the sum of the numbers contained in a string and displays the result. Use a string containing “2155” as your input value. For example, given the input , let num = “22”, I would sum 2 + 2 for a result of 4. The power is the amps at a given hour times the voltage at the same hour. Calculate the average power consumed for the...