Write a c program using for loop to print typical pattern if
number of rows is entered by keyboard.
ABCBA
AB BA
A A
Answer / a.jayashree
#include<stdio.h>
#include<string.h>
main()
{
char a[5];
int i=0,j=0;
printf("enter the string");
scanf("%s",a);
printf("\n%s",a);
for(i=0;i<a[5];i++)
{
if(a[i]==a[2])
{
printf("\n\t");
}
else
{
printf("%s",a);
}
}
for(j=0;j<a[5];j++)
{
if(a[j]==a[1])
{
if(a[j]==a[2])
{
if(a[j]==a[3])
{
printf("\n\t\t\t");
}
else
{
printf("%s",a);
}
}
}
}
}
| Is This Answer Correct ? | 2 Yes | 6 No |
What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
i want to job in your company, so how it will be possible.
What does the characters “r” and “w” mean when writing programs that will make use of files?
write a c programme for add of two numbers with out use of arthematic operators
What functions are used in dynamic memory allocation in c?
What is information technology.
How can you restore a redirected standard stream?
What is c method?
Write a program to print fibonacci series without using recursion?
In c programming write a program that will print 10 multiples of 3 except 15,18,21 using looping
how can i make a program with this kind of output.. Enter a number: 5 0 01 012 0123 01234 012345 01234 0123 012 01 0
Two's compliment of -5