0 like 0 dislike
1 view
asked in Computer Science by (474k points)
Write the general syntax of ifs statement?

1 Answer

0 like 0 dislike
answered by (474k points)
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
Welcome to Free Homework Help, where you can ask questions and receive answers from other members of the community. Anybody can ask a question. Anybody can answer. The best answers are voted up and rise to the top. Join them; it only takes a minute:

10.2k questions

9.2k answers


3.2k users


Free Hit Counters