answersLogoWhite

0


Best Answer

This Example code is written is basic. The counter variable is the Number you want to reach. You use a for loop to print from 1 to the counter number. Then you increase the counter number by 1 then go through your for loop again until you reach your counter number, and the process keeps going.

Counter as Integer

Counter= 1

Do

For Number = 1 to Counter

Print Number

Next Number

Counter=Counter+1

Loop

User Avatar

Wiki User

16y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How to write a program to get this as answer 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write a program to Print pyramid of numbers using java?

hi question is here, 1 1 2 1 2 3 1 2 3 4


Write a javascript program out of three no which one s greater?

1 2 3


Write a java program to print the following output using the for loop 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5?

12345 1234 123 12 1


Write a java script program to print first ten odd natural numbers in C?

Q.1 Write a program to print first ten odd natural numbers. Q.2 Write a program to input a number. Print their table. Q.3 Write a function to print a factorial value.


Write a program to multiply 33 matrix.?

write a program to multily 3*3 matrix.


Write a c program for false position method?

Write a simple program in finding roots x^3-6x^2+11x-6.1=0


Write a program in C to print 1 to10 as 1 2 3 4 5 6?

int main() { for(int i = 1; i


How to write a c program to generate 1 3 6 10 15?

You should use some sort of loop. E.g. for (i=1; i<=5; ++i) printf ("%d ", i*(i+1)/2);


What is 2.5 in a mixed number?

It is 2 and 1/2 which you can write 2 1/2


How do you run c programm with add two numbers?

1. Write the program 2. Compile and link it 3. Execute it by entering its name at command prompt


How do you write a whole number as a proper fraction?

1 = 1/1 or 2/2 or 3/3 so on


How would you write -2 divided by -3?

1