Created
December 24, 2023 09:16
-
-
Save hisava/2aac2a2e30f7a32ce5dfe029f6fa8920 to your computer and use it in GitHub Desktop.
mywhile.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() { | |
srand( time( NULL ) ); | |
while ( true ) { | |
int randNum = rand() % 100 + 1; | |
cout << randNum << endl; | |
if ( randNum > 95 ) { | |
cout << "Конец цикла while" << endl; | |
break; | |
} | |
} | |
cout << "Пока. Хорошего дня" << endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment