Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Window Help ( cuny blackb(/w content-, x\ 11) Facebook | O repl it-C++ s/blackbo

ID: 3889210 • Letter: W

Question

Window Help ( cuny blackb(/w content-, x 11) Facebook | O repl it-C++ s/blackboard/content/listContent jsp?course.id- 1438221.18cc cuny blackboard 1098 unreal: Bb Content i Oreplit-C++ aeB Test 1 Review Attached Files: CST2403..Test1 Review.docx (20.354 KB) Class Assignment #1 Class Assignment #1 Write C++ program for each of the following: 1. Input a number from the user and display the cube of that number. Input 2 numbers from the user and display their sum and product. or the algebraic expression below, write the C++ equivalent expression within the program m =a+h-c+d + e Assignment #1 / Use only the techniques that werc taught in the class. No points will be given

Explanation / Answer

2)

#include <iostream>
using namespace std;

int main()
{
int n1, n2, sum, product;
  
cout << "Enter two integers: ";
cin >> n1 >> n2;

// sum of two numbers in stored in variable sum
sum = n1+ n2;
//product of two numbers in stored in variable product
product= n1*n2;

// Prints sum and product
cout<<" sum of "<<n1<<" and "<<n2<< " is " <<sum <<" " ;
cout<<" product of "<<n1<<" and "<<n2<< " is " <<product;   

return 0;
}

3)

#include <iostream>
using namespace std;

int main()
{
float a,b,c,d,e;
float m;
  
cout << "Enter a,b,c,d,e,m values: ";
cin >> a >> b >> c >> d >> e;

// equivalent expression for algebraic expression
m = (a+b+c+d+e)/5;
  
cout<<" result is " << m <<" " ;
return 0;
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote