Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Online C++ Compiler. Code, Compile, Run and Debug C++ program online. Write your code in this editor and press Run button to compile and execute
Online C++ Compiler. Code, Compile, Run and Debug C++ program online.Write your code in this editor and press "Run" button to compile and execute it.
*******************************************************************************/
#include using namespace std;int main(){int sum=0;cout<<"Part-a";cout<<"--------------";for(int n=4;n<=9;n++){sum += 7 * (n-3);}cout<<"Sum = "<
// part bcout<<"Part-b";cout<<"--------------";for(double n = 1; n < 8; n++){cout << n << ": " << n / (n * n) << endl;}
cout<<"Part-c";cout<<"--------------";sum = 0;for(double n = 4; n < 10; n++){sum += 7 * (n - 3);}cout << sum << endl; cout<<"Part-d";cout<<"--------------";for (int row = 1; row <= 4; row++){for (int col = 1; col <= row; col++){cout << "*";}cout << endl;}return 0; }
my professor what me to used POW() function in my code i dont know how to put it in I NEED HELP
he also want me to to indent properly
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started
Online C++ Compiler.
Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.
*******************************************************************************/
#include
using namespace std;
int main()
{
int sum=0;
cout<<"Part-a";
cout<<"--------------";
for(int n=4;n<=9;n++)
{
sum += 7 * (n-3);
}
cout<<"Sum = "<
// part b
cout<<"Part-b";
cout<<"--------------";
for(double n = 1; n < 8; n++)
{
cout << n << ": " << n / (n * n) << endl;
}
cout<<"Part-c";
cout<<"--------------";
sum = 0;
for(double n = 4; n < 10; n++)
{
sum += 7 * (n - 3);
}
cout << sum << endl;
cout<<"Part-d";
cout<<"--------------";
for (int row = 1; row <= 4; row++)
{
for (int col = 1; col <= row; col++)
{
cout << "*";
}
cout << endl;
}
return 0;
}
my professor what me to used POW() function in my code i dont know how to put it in I NEED HELP
he also want me to to indent properly
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started