-
Notifications
You must be signed in to change notification settings - Fork 0
/
Lecture 7
61 lines (49 loc) · 840 Bytes
/
Lecture 7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#include<iostream>
using namespace std;
int main(){
int password;
cout<<"Enter the password: "<<endl;
cin>>password;
while(password<999999){
cout<<"The password does not meet the required conditions, Please enter the password again"<<endl;
cin>>password;
}
cout<<"The user has now entered a correct"<<endl;
return 0;
}
#include<iostream>
using namespace std;
int main(){
int password;
do {
cin>>password;
}while(password<999999);
return 0;
}
#include<iostream>
using namespace std;
int main(){
while(1){
cout<<"chocolate"<<endl;
}
}
#include<iostream>
using namespace std;
int main(){
int cout=0;
while(1){
cout<<"chocolate"<<endl;
count++;
if(count>100) break;
}
}
#include<iostream>
using namespace std;
int main(){
int i;
for(i=0; ; i++){
cout<<i;
if(i>100) break;
}
return 0;
}