cumulative quotient

What i want to do it have the user put in a number, and then prints the answer of the number divided by all of the numbers below it (above one) such as 6 / 5 / 4 / 3 / 2 = 0.05. Help would be much appreciated.
What do you have so far?
i tried many combinations of it and deleted and retried many times, this is what i have.

#include <iostream>
#include <math.h>
#include <windows.h>

double number = 0;
double newnumber = 0;
double result = 0;
double newresult = 0;
double newresults = 0;
int loop = 0;
using namespace std;

int main ()
{
cout <<"Welcome to the devisor infinite! put in a number and it will divide all numbers below it.\n";
cin >> number;
system("CLS");
cout <<" Processing...\n";
Sleep(600);
system("CLS");

double newnumber = number;
double loop = number;
double number = result;
do {
(result = number / number - 1);
number --;
continue;
}while (number);






cout <<"Your answer is "<< result <<"\n";



system("pause");



return 0;
}
Have you tried using a for loop?
1
2
3
4
for (int i = number - 1; i > 0; --i)
{
    // Divide by i
}
ill try that. Im very new with programming and i just started a month ago for school. Thanks for the help ill post what happens
Topic archived. No new replies allowed.