VenkatRJV VenkatRJV - 1 month ago 5
C++ Question

for loop with incremenation of 5

Use a counter named count that has an initial value of 1, a final value of 20, and an increment of 5.

for(int count=1; count<20; count=count+5)
cout<<count<<endl;


Is the correct approch?

Answer

ya correct .. start with initial point 1 and final value of 20 , increment by 5

for(int count=1; count<=20; count=count+5)

Comments