1 solutions

  • 0
    @ 2025-11-5 18:53:36

    C++ :

    #include<iostream>
    using namespace std;
    int main()
    {
    	int x,y;
    	cin>>x;
    	if (x<1) y=x;
    	else if (x>=1 && x<=10) y=2*x-1;
    	else y=3*x-11;
    	cout<<y<<endl;
    	return 0;
    }
    
    • 1

    C语言程序设计教程(第三版)课后习题5.5

    Information

    ID
    19084
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    (None)
    Tags
    (None)
    # Submissions
    0
    Accepted
    0
    Uploaded By