Answer to Question #269877 in C++ for oman

Question #269877

1. Calculate the value of a function y=2x^2+15 with x varying from 1 to 20 in increments of 0.5.



1
Expert's answer
2021-11-22T09:53:25-0500
#include<iostream>
#include<math.h>
using namespace std;
int main()
{
	 double x;
	 double y;
	 for(x=1;x<=20;x+=0.5){
	 y=2*pow(x,2)+15;
	 cout<<"Value is: "<<y<<endl;
	 
}}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS