answersLogoWhite

0


Best Answer

//(this is just a function, call this as count(n) in your main loop)

void count(int n){

int i = 1;

do{

printf("%d", i);

i++;

} while(i<=n);

}

User Avatar

Wiki User

11y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

13y ago

$n = 1;

do{

echo "$n\n";

}while(++$n <= 10);

This answer is:
User Avatar

User Avatar

Wiki User

9y ago

int i=0;

do {

/*...*/

} while (++i<n);

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

void NNatural (int N) {

int n = 1;

do printf ("%d\n", n);

while (++n < N);

}

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a program to print n natural numbers using do-while loop?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

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.


How. to. write an. algorthim. to find the. sum of. first. 15 natural. numbers?

Write an. Algorthim. To. Find the. Sum. Of. First15 natural. Numbers


Write a program in Lex to eliminate white space and collect numbers as a token?

write a lex program to delete space from the program


How do you write a program to find out the square and cube of first ten natural numbers in gw basic?

First you will need to have some basic programming knowledge. You can use this to help make the program that is needed.


How do you write an assembly language program to find the sum of n numbers using array?

write an assembly language program to find sum of N numbers


Shell program for gcd of three given numbers?

write a shell program for finding out gcd of three given numbers? write a shell program for finding out gcd of three given numbers? write a shell program for finding out gcd of three given numbers? check bellow link http://bashscript.blogspot.com/2009/08/gcd-of-more-than-two-numbers.html


How do you write a program in objective c numbers 1-100 prime numbers?

fdsgfhgdfhgdf


Could you Write a program for 8086 microprocessor that displays on the monitor the average of 2 numbers from an array?

How to write a program for mouse in microprocessor?


How to write a C program to find largest 2 numbers using pointers?

program to find maximum of two numbers using pointers


Write a program to add two 8 bit numbers in microprocessor 8051?

write it in 8085


How do you write a program to read set of numbers using by an array and display the ascending order of the given input numbers?

To write a C++ program to display the student details using class and array of object.


How do you write a VBnet program to find the prime numbers between 100 to 200?

VBnet program to find the prime numbers between 100 to 200?