answersLogoWhite

0

for(i=1;i<=5;i++)

{ for(x=5;x>=i;x--)

{ printf(" ");

}

for(j=1;j<=2*i-1;j++)

{ printf("1");

}

printf("\n");

}

User Avatar

Wiki User

17y ago

What else can I help you with?

Related Questions

Write a routine to implement the t e x t function?

There are many ways you could write a routine to implement text functions. You could, for example, come up with codes.


Program in 'c' to find the LCM of any given five numbers?

Just write a method or function that calculates the LCM for two numbers at a time. Then calculate the LCM for the first two numbers, get the LCM of the result with the third number, etc.Just write a method or function that calculates the LCM for two numbers at a time. Then calculate the LCM for the first two numbers, get the LCM of the result with the third number, etc.Just write a method or function that calculates the LCM for two numbers at a time. Then calculate the LCM for the first two numbers, get the LCM of the result with the third number, etc.Just write a method or function that calculates the LCM for two numbers at a time. Then calculate the LCM for the first two numbers, get the LCM of the result with the third number, etc.


How do you write a vb script code to print a pyramid of numbers?

Dont know pyramid but I have code for writting a Triangle- For i=1 to 5 For j=1 to i var= var&amp; " *" Next var=var &amp; vbnewline Next Msgbox var


Write a program to implement prim's algorithm?

dfgbrgffee


How can I write a program to display prime numbers from 1 to 100?

Write a function that implements an algorithm that checks to see if a particular integer is prime (returning a boolean). Write a program that uses that function on each number from 1 to 100, and if true, displays that number.


How do you write it in numbers k is a function of n and 7 times n equals k?

k = f(n) = 7n


Write a program to swap two numbers using function?

swap (int *a, int *b) { *a ^= *b; *b ^= *a; *a ^= *b; }


How do you write a program to find the greatest common factor of a set of numbers?

You achieve this by putting all the values in container that allows linear traversal, such as an array. If the array has no numbers at all, the greatest common factor is 0. if the array has one number, the greatest common factor is that number. For arrays with two or more numbers, pop the last two numbers and calculate their greatest common factor, pushing the result back onto the array. Repeat until there is only one number left in the array. That number is the greatest common factor of all the original numbers. To implement this, you will need a function that can return the greatest common factor of any two values. The following shows one way to implement this function: unsigned greatest_common_factor (unsigned a, unsigned b) { while (a!=b) a&gt;b?a-=b:b-=a; return a; }


Write a program to Print pyramid of numbers using java?

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


How do you write 314207 in numbers?

You just wrote it in numbers.. but. 31,4207 is how you write it in numbers


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 an algorithm to implement any three operation of a queue?

8798797