write a c program to calculate the output y for a


Write a C program to calculate the output Y for a given value of X for the following formula

  Y=X2 + 2X +3
  #include stdio.h
  void main()
  {
  char promt;
  float y,x;
  printf("Please enter in the real value of X\n\r");

scanf("%f",&x);
y = (x*x) + 2*x + 3;     
printf("The value of Y is %f \n\r",y);  
printf("Press any key to exit \n\r");
scanf("\n%c",&prompt);  
}

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: write a c program to calculate the output y for a
Reference No:- TGS0414845

Expected delivery within 24 Hours