1002: simple polynomial evaluation

Title Description

Any integer number of user inputs, the output value of the polynomial.

y=2x2+x+8

Entry

Input integer value of x.

Export

Output an integer, i.e. the value of the polynomial.

Sample input Copy

1

Sample output Copy

11

Source / classification

 1 #include<stdio.h>
 2 int main()
 3 {
 4     int x,y;
 5     
 6   scanf("%d",&x);
 7   y=2*x*x+x+8;
 8   printf("%d",y);
 9   return 0;
10 }

 

Guess you like

Origin www.cnblogs.com/wangmengru/p/11480798.html