Дано число n. Напечатать те натуральные числа, квадрат которых не превышает n — C++(Си)

#include <iostream>

using namespace std;
 
int main()
{
    setlocale (LC_ALL, "Russian");
    int n, ch(0);
    std::cout<<"Введите  число n:\n",
        std::cin>>n;
    while (true)
    {
        if(ch * ch < n)
        {
            std::cout<<ch<<' ';
            ch++;
        }
        else
            break;
    }
    system("pause");
    return 0;
}

4 Thoughts to “Дано число n. Напечатать те натуральные числа, квадрат которых не превышает n — C++(Си)”

  1. hey there and thank you for your information – I have definitely picked up something new from right
    here. I did however expertise some technical points using this site, as I experienced to reload the web site many times previous to I
    could get it to load correctly. I had been wondering if
    your web hosting is OK? Not that I am complaining, but slow loading instances times will very frequently affect your placement
    in google and could damage your quality score if advertising
    and marketing with Adwords. Well I am adding this RSS to my email and could look out
    for a lot more of your respective exciting content.
    Ensure that you update this again soon..

  2. I like this web blog it’s a master piece! Glad I discovered this on google.!

  3. Really excellent information can be found on site.
    Travel guide

  4. Hi exceptional blog! Does running a blog like this require a great deal of work?
    I have virtually no expertise in coding but I was hoping to start my own blog soon. Anyhow, should you have any suggestions or
    tips for new blog owners please share. I know this is off subject nevertheless I simply wanted to ask.
    Thanks!

    Feel free to visit my blog post — 만세력 무료

Leave a Comment