No1
学C++可不是只能枯燥刷题呢,也可以调动大脑给C++的学习增添一丝丝乐趣。
比如:做一个跳舞的机器人、设计一把可以拉开的弓 ··· ···
安装了C++学习神器:轻、便、快,学习C++的神器
紧接着,我们捣鼓了一番字母符号:字母符号都被C++玩坏
乘着ChatGPT的热度,我们写个程序:C++写一个蹩脚的ChatGPT,真蹩脚呀
今天需要用C++做个动画,天啦C++要做动画,那不得写很多很多行代码。
是的哦,需要写很多的代码,但是并不复杂都是相同的代码,只需要我们有一些耐心即可。
No2
兴趣是最好的老师,很多家长和小伙伴对C++学习的目的是信奥赛。面对信奥赛刷题是不可避免的,而且需要大量的刷题。这需要小伙伴可以产生刷题通过后的成就感,也需要自驱的学习力。
但是自驱的学习动力和内在的成就感,不是一蹴而就培养出来的。那么在前期的学习中,穿插一些项目制的学习内容,也是不错的选择。
#include<iostream>
#include<windows.h>
using namespace std;
int main(){
while (true){
cout << " *****" << endl;
cout << " *****" << endl;
cout << " *****" << endl;
cout << " *" << endl;
cout << " *" << endl;
cout << "****** * ******" << endl;
cout << " *" << endl;
cout << " *" << endl;
cout << " * *" << endl;
cout << " * *" << endl;
cout << " * *" << endl;
cout << " * *" << endl;
Sleep(100);
system("cls");
cout << "* ***** *" << endl;
cout << " * ***** *" << endl;
cout << " * ***** *" << endl;
cout << " * * *" << endl;
cout << " * * *" << endl;
cout << " * * *" << endl;
cout << " *" << endl;
cout << " *" << endl;
cout << " * *" << endl;
cout << " * *" << endl;
cout << " * *" << endl;
cout << " * *" << endl;
Sleep(100);
system("cls");
}
return 0;
}
#include<windows.h>
while (true){}
使用方法:
它有一个参数,参数为 int 类型,表示要暂停的毫秒数。
注:1000毫秒=1秒
特别注意:S要大写哟!
Sleep(100);
system("cls");
cout << " *****" << endl; cout << " *****" << endl; cout << " *****" << endl; cout << " *" << endl; cout << " *" << endl; cout << "****** * ******" << endl; cout << " *" << endl; cout << " *" << endl; cout << " * *" << endl; cout << " * *" << endl; cout << " * *" << endl; cout << " * *" << endl;
联系客服