• 个人简介

    #include<bits/stdc++.h>
    using namespace std;
    int main() {
    	cout<<"在心中想一个数1-31\n";
    	int j=0;
    	char pd;
    	cout<<" 1  3  5  7\n";
    	cout<<" 9 11 13 15\n";
    	cout<<"17 19 21 23\n";
    	cout<<"25 27 29 31\n";
    	cout<<"上面有没有你心中的数字:";
    	cin>>pd;
    	if(pd=='Y')
    		j+=1;
    	cout<<"\n";
    	cout<<" 2  3  6  7\n";
    	cout<<"10 11 14 15\n";
    	cout<<"18 19 22 23\n";
    	cout<<"26 27 30 31\n";
    	cout<<"上面有没有你心中的数字:";
    	cin>>pd;
    	if(pd=='Y')
    		j+=2;
    	cout<<"\n";
    	cout<<" 4  5  6  7\n";
    	cout<<"12 13 14 15\n";
    	cout<<"20 21 22 23\n";
    	cout<<"28 29 30 31\n";
    	cout<<"上面有没有你心中的数字:";
    	cin>>pd;
    	if(pd=='Y')
    		j+=4;
    	cout<<"\n";
    	cout<<" 8  9 10 11\n";
    	cout<<"12 13 14 15\n";
    	cout<<"24 25 26 27\n";
    	cout<<"28 29 30 31\n";
    	cout<<"上面有没有你心中的数字:";
    	cin>>pd;
    	if(pd=='Y')
    		j+=8;
    	cout<<"\n";
    	cout<<"16 17 18 19\n";
    	cout<<"20 21 22 23\n";
    	cout<<"24 25 26 27\n";
    	cout<<"28 29 30 31\n";
    	cout<<"上面有没有你心中的数字:";
    	cin>>pd;
    	if(pd=='Y')
    		j+=16;
    	cout<<"你心中的数是"<<j; 
    	return 0;
    }
    
  • 通过的题目

  • 最近活动

题目标签

初窥门径
65
顺序结构
41
循环结构
21
分支结构
11
略有小成
4
for循环
2
while循环
1
GESP一级
1
样题
1