⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 weather.cpp

📁 在c环境下的对数据结构进行讲解,包含有例题及答案
💻 CPP
字号:
 //weather.cpp
 #include <iostream.h>
 #include <conio.h>
 #include <stdlib.h>				//randomize(),random
 void main()
 { int weather;
   cout << "天气(0,1)=";			//0:好,1:雨
   cin >> weather;
   if (weather)					//weather==1
   { cout << "看电影去,多少钱?";
     int money;
     cin >> money;
     if (money>=1000)
     cout << "钱够\n";
     else
     cout << "钱不够\n";
   } else
   { cout <<"郊游去,交通工具(0,1)=";	//0:公车 1:自行车
     int tool;
     cin >> tool;
     if (tool)
     cout << "骑自行车\n";
     else
     cout <<"搭公车\n";
   }
   getch();
 }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -