I'll give you the syntax in C#. I think its the same in C
(i) if(condition) {
//do stuff
}
(ii) if (condition) {
// do stuff
}
else {
//do other stuff
}
(iii) while(condition) {
//here goes my stuff
//beware of infinite looping if your condition is always true
}
hope this helps