DEV Community

Mohammed Salah
Mohammed Salah

Posted on

C++13th code (Loop using if --> Even Number )

    #include<iostream>
    using namespace std; 
    int main()
    {
int i ; 
cout<<" \n\n\t\t Enter The number : ";
cin>>i; 
start :
if(i>500)
{
return 0;   
}
if (i%2==0)
{
    cout<<"\n This is even number  --> "<<" ("<<i<<") "; 
}
i++;
goto start; 
    cin.get();
    return 0 ; 
    }
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more