package day1;
import javax.swing.JOptionPane;
public class Ai {
public static void main(String[] args) {
// TODO 自动生成方法存根
String pop="1";
while(pop.equals("1")){
int b=0;
for(int i=0;i<5;i++){
String a=JOptionPane.showInputDialog("1、爱我 2、不爱我");
if(a.equals("1")){
JOptionPane.showMessageDialog(null, "我也爱你");
b++;
if(b==4){
JOptionPane.showMessageDialog(null, "嫁给我吧");
}else{
JOptionPane.showMessageDialog(null, "加油");
}
}else if(a.equals("2")){
JOptionPane.showMessageDialog(null,"我也不爱你");
b++;
if(b==4){
JOptionPane.showMessageDialog(null, "你给我滚");
}else{
JOptionPane.showMessageDialog(null, "浪费感情");
}
}else{
JOptionPane.showMessageDialog(null, "发生错误");
}
}
}
}
}
Ai.rar_ai
版权申诉
5 浏览量
2022-09-21
06:54:27
上传
评论
收藏 1KB RAR 举报
![avatar](https://profile-avatar.csdnimg.cn/d600a32f29294db1a3be82ec9708491a_weixin_42651887.jpg!1)
weixin_42651887
- 粉丝: 81
- 资源: 1万+