5 solutions

  • 8
    @ 2023-10-7 11:33:04

    本题考察int型变量的基本应用

    根据题意思路为为:定义三个整型变量,输入三个整型变量,输出第二个整型变量。

    参考代码如下:

    #include<iostream> 
    using namespace std;
    int main(){
    	int a,b,c;
    	cin>>a>>b>>c;
    	cout<<b;
    	return 0;
    }
    
    • 2
      @ 2024-7-14 16:23:57

      题目分析:

      输入三个整数,输出第二个。

      其实我们不需要存储第一个和第三个整数,所以我们可以只使用一个变量,输入两次,第一次输入第一个整数,第二次用第二个整数覆盖第一个整数。

      代码实现:

      #include<cstdio>
      int main(){
      	int b;
      	scanf("%d%d",&b,&b);
      	printf("%d",b);
          return 0;
      }
      
      

      记得给五星好评哦喵~ 谢谢客官啦~

      • 1
        @ 2024-3-3 11:47:00
        #include<iostream> 
        using namespace std;
        int main(){
        	int a,b,c;
        	cin>>a>>b>>c;
        	cout<<b;
        	return 0;
        }
        
        • 0
          @ 2024-12-26 17:04:06

          #include using namespace std; int main(){ cout <<""<<endl ; cout <<""<<endl; cout << ""<<endl; return 0; }

          • 0
            @ 2024-10-30 17:13:28

            #include using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; cout<<b; return 0; }

            • 1

            Information

            ID
            53
            Time
            1000ms
            Memory
            128MiB
            Difficulty
            4
            Tags
            (None)
            # Submissions
            1056
            Accepted
            524
            Uploaded By