Great Deal! Get Instant \$10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

# 1. [2] Write a program that asks the user for a positive integer, then outputs all the numbersfrom 1 to that number. 2. [2] Write a program that asks the user for a number and prints out that many...

1. [2] Write a program that asks the user for a positive integer, then outputs all the numbersfrom 1 to that number.
2. [2] Write a program that asks the user for a number and prints out that many stars ona line. Continue asking the user for new numbers until they decide not to.
3. [3] Write a program that asks the user for a number, and then outputs all the factors ofthe number.
4. [3] Write a program that asks the user for a number, and then outputs a pyramid of â€˜*â€™ whose largest layer is the entered number.
5. [2] Write a program that asks the user for a number, then outputs an offset pyramid ofstars with that many layers.
PLEASE VIEW THE DOCUMENT ATTACHED. PLEASE COMPLETE THESE QUESTIONS USING WHILE LOOPS AND AS BASIC JAVASCRIPT AS POSSIBLE. YOUARE NOT ALLOWED TO USE PROMPT BOXES FOR INPUTS. ALL INPUT MUST BE DONE ON THE PAGE ITSELF(IN AN HTML INPUT).
Answered 353 days After Apr 29, 2021

## Solution

Shobhit answered on Apr 18 2022
Write a program that asks the user for a positive integer, then outputs all the numbers from 1 to that numbe
#include
int main()
{
int n;
printf("Enter a positive number:");
scanf("%d",&n);
int i=1;
while(i<=n)
{
printf("%d\n",i);
++i;
}
}
Write a program that asks the user for a number and prints out that many stars on a line. Continue asking the user for new numbers until they decide not to.
#include
int loop(int n)
{
int i=1;
while(i<=n)
{
printf("*");
++i;
}
printf("\n");
}
int main()
{
int n;...
SOLUTION.PDF