fork download
  1. #include <stdio.h>
  2. void main()
  3. {
  4. int x,y;
  5. printf("x:");
  6. scanf("%d",&x);
  7. if(x<1)
  8. {
  9. y=x;
  10. }
  11. else if (x>=1 && x<10)
  12. {
  13. y=2*x-1;
  14. }
  15. else
  16. {
  17. y=3*x-11;
  18. }
  19. printf("y=%d\n",y);
  20. }
  21.  
Success #stdin #stdout 0.01s 5288KB
stdin
12
stdout
x:y=25