Pull to refresh
36
0
nailll @nailll

User

Send message

Задачка "Hello World"

Reading time 1 min
Views 6.7K
Итак, вопрос знатокам: Сколько раз на экране появится заветная фраза при выполнении этой программы?

#include <iostream>
int main(int argc, char* argv[])
{
   int i = 10;
   std::cout<<"Hello World!"<<std::endl;
   // Сколько раз???
   while(i--)
   {
      // Сколько раз будет вызвана эта строка???/
      for(int j=0; j<10; j++)
         std::cout<<"Hello World!"<<std::endl;
   }
   return 0;
}
Читать дальше →
Total votes 129: ↑101 and ↓28 +73
Comments 183

Information

Rating
Does not participate
Location
Россия
Date of birth
Registered
Activity