cin>> bilangan ;
for (int counter = 1; counter < bilangan ; counter ++)
cout<< counter + 2 <<” ”<<endl;
What is the output if bilangan is 4 ?
//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);
}
Comments
Leave a comment