fork download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. int x, y;
  5. printf("Enter a value for x: ");
  6. scanf("%d", &x);
  7. y = x * x + 2 * x + 1;
  8. printf("The value of y is %d\n", y);
  9. return 0;
  10. }
  11.  
Success #stdin #stdout 0.01s 5472KB
stdin
Standard input is empty
stdout
Enter a value for x: The value of y is 1073610756