write a program to display the numbers in the following
4 4
3 3
2 2
1 1
0
1 1
2 2
3 3
4 4
Answer / vidyullatha
#include<stdio.h>
main()
{
int i,j,k,l;
int space=7;
for(i=4;i>=0;i--)
{
for(j=4;j>i;j--)
{
printf(" ");
}
printf("%d ",i);
for(j=0;j<space;j++)
{
printf(" ");
}
if(space>0)
printf("%d ",i);
space = space-2;
printf("\n");
}
space = 1;
for(i=1;i<=4;i++)
{
for(j=4;j>i;j--)
{
printf(" ");
}
printf("%d ",i);
for(j=0;j<space;j++)
{
printf(" ");
}
printf("%d ",i);
space = space+2;
printf("\n");
}
}
Is This Answer Correct ? | 6 Yes | 0 No |
Given a string write a program to print all alphabetical characters in the order of their occurance first,followed by the sum of the numeric characters then followed by the special characters in the order of their occurance.
1 Answers College School Exams Tests, Wipro,
I was asked to write a program in c which when executed displays how many no.of clients are connected to the server.
What is string in c language?
char ch=10;printf("%d",ch);what is the output
Are there namespaces in c?
how many error occurs in C language ?
how to find out the biggest element (or any other operation) in an array which is dynamic. User need not to mention the array size while executing.
Can a pointer be static?
related to rdbms query .
How to calculate Total working time using Login and logout?
2 Answers CTS, Cygnus, Infosys, Signal Networks, TCS, Wipro,
being a chemical engineer and with an aggregate of 80% why you opt for TCS and not your core industry?
What is hashing in c language?