Quantcast
Channel: Go4Expert
Viewing all articles
Browse latest Browse all 1989

logical operators in c++

$
0
0
i am a novice programmer and i want to learn through practicing.
Code:
#include <iostream>
using namespace std;
int main()
{
for(int i=0;i<=6;i++)
{
if((i<=3)&&(i==5))
continue;
cout << i << "\t";

}
}
I created the above code and my required output of this code is 4 6. when i compile and run this code the output is 0 1 2 3 4 5 6 which is not my required output. I can get my required output through || operator.

Code:
#include <iostream>
using namespace std;
int main()
{
for(int...
logical operators in c++

Viewing all articles
Browse latest Browse all 1989

Trending Articles