हिंदी

Write a while loop that displays numbers 2, 4, 6, 8.......20.

Advertisements

प्रश्न

Write a while loop that displays numbers 2, 4, 6, 8.......20.

टिप्पणी लिखिए
Advertisements

उत्तर

While loop to
i = 2;
while(i<=20)
{
cout<< i <<“,”;
i = i+2;
}

shaalaa.com
Iteration Statements
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 10: Flow of Control - Evaluation - Section - B [पृष्ठ १७८]
Advertisements
Share
Notifications



      Forgot password?
Use app×