#include <stdio.h>
int main (void)
{
int i,j;
for (i=1;i<5;i++)
{
for(j=1;j<=i;j++)
printf("%d",j);
printf("\n");
}
return 0;
}
public class BubbleSortAscendingOrderDemo { public static void main(String a[]) { //Numbers which need to be sorted int numbers[] = {23,5,23,1,7,12,3,34,0}; //Displaying the numbers before sorting System.out.print("Before sorting, numbers are "); for(int i = 0; i < numbers.length; i++) { System.out.print(numbers[i]+" "); } System.out.println(); //Sorting in ascending order using bubble sort bubbleSortInAscendingOrder(numbers); //Displaying the numbers after sorting System.out.print("Before sorting, numbers are "); for(int i = 0; i < numbers.length; i++) { System.out.print(numbers[i]+" "); } }
A "do while....." statement is a looping instruction to a program to repeat a stage in the program while some condition is true - e.g while a variable is negative, or, while one variable is less than another. A "do for ....." statement is a looping instruction to a program to repeat a stage in the program a set number of times - e.g for steps = 1 to 10, or, for steps = 1 to (some variable).
Pop-up blocker
There is insufficient information in the question to answer it. Please rephrase the question.
FlashGet Download Manager
This is happening because when the programmer is displaying the number, it is being displayed as a character with a decoding process of a = 1, b = 2, etc. 5 + 8 = 13 = m
An infinite loop might look something like: while 1==1: print("Infinite loop") as 1 is ALWAYS equal to 1.
You cannot, unless n is a counter in a program or algorithm for a looping process. In that case, you need to know what the algorithm is doing.
for (n=1; n<1000; ++n) { for (sum=0, k=1; k<=n/2; ++k) if (n%k==0) sum += k; if (sum==n) printf ("%d\n", n); }
A program which is used to count the number of numbers in an array using a 8085 microprocessor is known as a assembly language program.
program to find maximum of two numbers using pointers
Through a computer program that randomizes numbers.