1
232
34543
4567654
can anyone tell me how to slove this c question

Answer Posted / sham

int main()
{
int i,j,k,l=0,n;
printf("Enter the length\n");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
k=2;
for(j=0;j<i+l;j++)
{
if(i<=j)
{
printf("%d",i+j-k);
k=k+2;
}
else
printf("%d",i+j);
}
l++;
printf("\n");
}
}

Is This Answer Correct ?    13 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

a direct address that identifies a location by means of its displacement from a base address or segment a) absolute address b) relative address c) relative mode d) absolute mode

645


Is swift based on c?

632


What is a const pointer?

626


Is the exit() function same as the return statement? Explain.

655


What is c definition?

736






the factorial of non-negative integer n is written n! and is defined as follows: n!=n*(n-1)*(n-2)........1(for values of n greater than or equal to 1 and n!=1(for n=0) Perform the following 1.write a c program that reads a non-negative integer and computes and prints its factorial. 2. write a C program that estimates the value of the mathematical constant e by using the formula: e=1+1/!+1/2!+1/3!+.... 3. write a c program the computes the value ex by using the formula ex=1+x/1!+xsquare/2!+xcube/3!+....

22183


What are the advantages of using linked list for tree construction?

638


What is the difference between exit() and _exit() function?

596


Explain what is the heap?

616


how to print the character with maximum occurence and print that number of occurence too in a string given ?

2029


c language interview questions & answer

1453


Can you write a programmer for FACTORIAL using recursion?

606


What are the disadvantages of a shell structure?

685


What is the incorrect operator form following list(== , <> , >= , <=) and what is the reason for the answer?

927


Differentiate between Macro and ordinary definition.

720