C# program to count first 50 number divisible by 3

How to write c# program to count first 50 number divisible by 3 or 4.
how to write c# program to count first 50 number divisible by 3 and 4.

Questions by Shaikh Aamir

Showing Answers 1 - 1 of 1 Answers

Chaitrali Deshpande

  • Jul 16th, 2011
 

Code
  1. int counter = 0;

  2. int no = 1;

  3. while(counter != 50)

  4. {

  5. if(no% 3 == 0)

  6. {

  7. counter++;

  8. no++;

  9. }

  10. else

  11. no++;

  12. }

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions