my teacher told us to "make a program that will print the first 10 consecutive numbers starting from 1 using the while and do" but i don't know how to do, i hope you can help me guys, thanks
carrese04
0
Newbie Poster
Recommended Answers
Jump to PostCan you be more clear.
Do you need to print numbers from 1 to 10 using do while loop?
Jump to Postint main() { intialize an int variable with the inital value either zero or one while( variable < maxvalue) { //maxvalue is 10 in your case print the variable value; increment the variable value; } return 0; }
thats all, finish.
All 5 Replies
mrnutty
761
Senior Poster
gle
0
Newbie Poster
Gaiety
1
Junior Poster
puranchandra248
0
Newbie Poster
Gaiety
1
Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.