how to print a number from 10 to 1. Using do while loop. But The Initial value shoudl be 1 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

how to print a number from 10 to 1. Using do while loop. But The Initial value shoudl be 1

12th Nov 2017, 6:02 PM
Abdul Wahab
Abdul Wahab - avatar
13 Answers
+ 1
print 11-x
12th Nov 2017, 6:46 PM
John Wells
John Wells - avatar
+ 8
@Abdul Ahad, I think you've already received helpful answer in this thread :) https://www.sololearn.com/Discuss/850211/?ref=app
12th Nov 2017, 6:46 PM
Shamima Yasmin
Shamima Yasmin - avatar
+ 1
thankewwwwww Sirrr 😍😘😘😘😘😘Love U ummmmmmmmahhh 😍😍😘😘😘😘 It's Done
12th Nov 2017, 6:50 PM
Abdul Wahab
Abdul Wahab - avatar
0
can you Write a program on. it plx?
12th Nov 2017, 6:24 PM
Abdul Wahab
Abdul Wahab - avatar
0
I tried aloot but didn't solved 😢😢 I want to learn but what if I failed to solved 😓😓 that was assignment 🙁🙁😢 plz help
12th Nov 2017, 6:32 PM
Abdul Wahab
Abdul Wahab - avatar
0
#include<iostream> #include<conio.h> using namespace std; int main () { int x=1; do { cout<<x<<endl; x++; } while(x<=10); getch(); } the output is 1 2 3 4 5 6 7 8 9 10 I want that output should come from 10 to 1
12th Nov 2017, 6:40 PM
Abdul Wahab
Abdul Wahab - avatar
0
noooo the assigning value must be 1. and end value must b 10.
12th Nov 2017, 6:45 PM
Abdul Wahab
Abdul Wahab - avatar
0
let me check
12th Nov 2017, 6:47 PM
Abdul Wahab
Abdul Wahab - avatar
0
hi can you hlep to teach please
6th Jan 2018, 8:30 PM
Ahmed Elsayed
Ahmed Elsayed - avatar
- 1
Assign 1 to variable, enter loop, print number, increase number, and while test for exit condition to loop or leave loop.
12th Nov 2017, 6:16 PM
John Wells
John Wells - avatar
- 1
Sure. But, that does nothing for you. Do you really want to learn the language or are you just look for a grade?
12th Nov 2017, 6:29 PM
John Wells
John Wells - avatar
- 1
Post a link to code and I'll help.
12th Nov 2017, 6:35 PM
John Wells
John Wells - avatar
- 1
Ok so assign 10 at top and loop until 1 subtracting each time.
12th Nov 2017, 6:44 PM
John Wells
John Wells - avatar