#include <iostream> using namespace std; //void function that accepts two argume
ID: 3641173 • Letter: #
Question
#include <iostream>using namespace std;
//void function that accepts two arguments: int num1 and int num2
// returns in the third argument int greatest; the maximum between num1 and num 2
//accepts one argument: int n
//returns the sum of the squares of the number from 1 to n
//accepts one argument: int
//returns true if n is a multiple of 3
//accepts three arguments: float,float,float
//returns the minimum of a,b,and c
//void function that accepts one argument:float
//function subtracts from 5 and a
need help filling in th missing code for my c++ programming class
Explanation / Answer
#include using namespace std; //void function that accepts two arguments: int num1 and int num2 // returns in the third argument int greatest; the maximum between num1 and num 2 void greatest(int num1, int num2, int &num3) { int greatest = num1; if (num2 > greatest) { greatest = num2; } num3 = greatest; } //accepts one argument: int n //returns the sum of the squares of the number from 1 to n int squareSum(int n) { int sum = 0; for(int i = 1; iRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.