Im not a CS major 
need help with
// Output: 1 2 6 24 120 ... (n - 1)!
// First n factorials
heres my bad code
{
int i = 1;
while (i < n){
std::cout << i << ' ';
// take the output and multiply that by the next number
// 1 * 2 = 2, 2 * 3 = 6, 6 * 4 = 24, 24 * 5 = 120
i = ? }
std::cout << i << ' ';
}
and second
// Output: 0 2 1 3 2 4 3 5 4 6 5 7 6 8 7 9 8 10
// Goes up by 2 and then down by 1 alternatively
{
int i = 0;
while (i < n){
std::cout << i << ' ';
i = ?
			
			need help with
// Output: 1 2 6 24 120 ... (n - 1)!
// First n factorials
heres my bad code
{
int i = 1;
while (i < n){
std::cout << i << ' ';
// take the output and multiply that by the next number
// 1 * 2 = 2, 2 * 3 = 6, 6 * 4 = 24, 24 * 5 = 120
i = ? }
std::cout << i << ' ';
}
and second
// Output: 0 2 1 3 2 4 3 5 4 6 5 7 6 8 7 9 8 10
// Goes up by 2 and then down by 1 alternatively
{
int i = 0;
while (i < n){
std::cout << i << ' ';
i = ?
 
				
		 
			 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		
 Facebook
Facebook Twitter
Twitter