NOTE: This is what I've guessed for the function prototypes, if you've more information and want to change the code, do let me know In the comments section below.
Code:
#include <iostream>
#include <string>
using namespace std;
// function prototypes
// 1.) this function wil display a menu, so it return type would
be void
// also it may not need any input arguments
void showMenu();
// 2.) this function gets user choice, as choice is declared as
char in main
// it's return type would be char, again it doesn't need any
arguments
char getChoice();
// 3.) this function calculates result, and result is declared
as double in main
// so it's return type would be double, also there are two numbers
declared in main
// num1 and num2 so calcResult() may perform some calculation on
these
// numbers so they'll be our input arguments
double calcResult(double num1, double num2);
// 4.) this function will show the result, it requires result as
input argument to show
// it and need not have a return type
void showResult(double result);
// 5.) as there are two strings in main() describing firstName
and lastName
// may be this function is used to get this info (i.e name), but as
a function can
// only return one value these strings would be passed as based on
reference
// so the return type will be void and input arguments will be
addresses to the string
void getInfo(string &firstName, string &lastName);
// 6.) this will show the name so it's input arguments will be
first and last name, and
// return type will be void
void showName(string firstName, string lastName);
// 7.) as this function's name suggest it'll be used to
calculate square of a number, so
// input argument will be the number and return type it's
square
double calcSquare(double number);
// 8.) again this function is used to check whether a number is
positive or not, so input
// will be the number to check and return type will be a boolean
for yes or no
bool isPositive(double number);
int main()
{
double num1 = 1.5;
double num2 = 2.5;
char choice;
double result;
string firstName;
string lastName;
char initial;
bool isPos;
return 0;
}


OUTPUT:
Output to show that the program has successfully compiled.

need help on this! Just write the function prototype for the following finctions while also using...
Need help with this C++ homework
I need help problem 1-9 that possible if my wish?
Thank you friend
Tiet
WRITE FUNCTION PROTOTYPES for the following functions. The functions are described below on page 2. (Just write the prototypes) When necessary, use the variables declared below in maino. mm 1.) showMenu m2.) getChoice 3.) calcResult m.) showResult 5.) getInfo mm.) showName 7.) calcSquare 8.) ispositive int main { USE THESE VARIABLES, when needed, to write function prototypes (#1 - #8)...
Need help problem 9-13
C++ Homework please help
WRITE FUNCTION PROTOTYPES for the following functions. The functions are described below on page 2. (Just write the prototypes) When necessary, use the variables declared below in maino. mm 1.) showMenu m2.) getChoice 3.) calcResult m.) showResult 5.) getInfo mm.) showName 7.) calcSquare 8.) ispositive int main { USE THESE VARIABLES, when needed, to write function prototypes (#1 - #8) double num1 = 1.5; double num2 = 2.5; char choice; double result;...
answer in c++ Using the table below, complete the C++ code to write the function prototype statement, and the void function header. The void function should receive three double variables: the first two by value and the last one by reference. Name the formal parameters num1, num2 and answer. The function should divide the num1 variable by the num2 variable and then store the result in the answer variable. Name the function calcQuotient. Also write an appropriate function prototype for...
The following class class studentType { private: char firstName[25]; char lastName[25]; int testScore[4]; double averageScore; public: }; int main(){ studentType student[30]; } Write c++ code ti create a constructor of studentType to initialize the member variables. Also write function to input values of the member variables and print the values
Run the C program below and complete the table showing all the variables. Add printf function calls to obtain the addresses and values of all 13 variables. (Count the array (ca) as 3 variable/values and also include argc and argv in the table). The table must show the Address, Name, Datatype, Scope, and Value of each variable on the stack. (Hint: use the sizeof function to double check your addresses.) Explain how different the actual memory allocations are from what...
Pointer arithmetic: a) Write a printString function that prints a string (char-by-char) using pointer arithmetics and dereferencing. b) Write a function “void computeMinMax(double arr[], int length, double * min, double * max)” that finds the minimum and the maximum values in an array and stores the result in min and max. You are only allowed to use a single for loop in the function (no while loops). Find both the min and the max using the same for loop. Remember...
Write in C language
5. [8] Write a function with prototype » void string_copy(const char source[], char destination[], int n); This function copies string source to string destination. Parameter n represents the size of array destination. If the latter array is not sufficiently large to hold the whole source string then only the prefix of the string which has room in the latter array should be copied. Note that after copying, the null character should also be included to mark...
using C++ language!! please help me out with
this homework
In this exercise, you will have to create from scratch and utilize a class called Student1430. Student 1430 has 4 private member attributes: lastName (string) firstName (string) exams (an integer array of fixed size of 4) average (double) Student1430 also has the following member functions: 1. A default constructor, which sets firstName and lastName to empty strings, and all exams and average to 0. 2. A constructor with 3 parameters:...
2. Pointer arithmetic: a) Write a printString function that prints a string (char-by-char) using pointer arithmetics and dereferencing. b) Write a function “void computeMinMax(double arr[], int length, double * min, double * max)” that finds the minimum and the maximum values in an array and stores the result in min and max. You are only allowed to use a single for loop in the function (no while loops). Find both the min and the max using the same for loop....
you need to write a C function named rem. The prototype is: int rem(char*, char*); The function accepts 2 strings: the first is a string of text to process; the second is where the output will be placed. rem() should remove all occurrences of a lowercase 'x' from the first string, and save the resulting string in the second arg. You may use the strlen() function; no other built-in fuctions should be used. Test your program thoroughly. Then, once you...