i wana know about that.......

if and else statements are conditional statements
... a basic programme is

int x
cout<<" enter your number";
cin>>x;

if (x < 20){
cout<<" YAY";
}

else if (x = 30){
cout<<"HOHOHHO";
}

else {
cout<<"QUACK!!";
}

its a basic code

main:-

if:- if the condition is true it will do what u want..

else:- if the condition of if statement is false

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.