Answer to Question #212796 in C++ for she

Question #212796

cin>> bilangan ;

for (int counter = 1; counter < bilangan ; counter ++)

   cout<< counter + 2 <<” ”<<endl;


What is the output if bilangan is 4 ?


1
Expert's answer
2021-07-03T04:46:13-0400
//What is the output if bilangan is 4 ?


main(void)
{
	int bilangan;
	cout<<"\nEnter bilangan: "; cin>> bilangan ;
	for (int counter = 1; counter < bilangan ; counter ++)
	{
		cout<<"counter = "<<counter+2<<endl;
	}
	return(0);
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS