Demo entry 6353159

c

   

Submitted by anonymous on Mar 30, 2017 at 12:41
Language: C. Code size: 293 Bytes.

#include <stdio.h>
void main()
{
        int x, y;
        printf("请输入X:");
        scanf("%d", &x);
        if (x < 1)
                y = x;
        else if (x < 10)
                y = 2 * x - 1;
        else
                y = 3 * x - 11;
        printf("y=%d\n", y);
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).