Anasayfa » the negation operator

the negation operator etiketindeki yazılar

C / C++ »

[7 May 2011 | 2 Yorum | 2.099 views ]
C / C++ Courses ? 11 (Negation Operator and For Loops)

The Negation Operator (! ? NOT)
x=3;
if(! (x>10) )
printf(?%d?,x); //it will print ?3?.
if(!0)
printf(?hey?); //it will print ?hey?.
if(!x)
printf(?%d?,x); //it will print nothing.

!true=false
!false=true

3 Steps Which We Should Follow

1- Declare the input and use scanf initialized before while
2- Use the input in condition while and compare it with sentinal value
3- Change the input using scanf before the end of the loop

Devamını Oku »