how can i get this by using for loop?
*
**
*
****
*
******
Answer Posted / vignesh1988i
sorry folks, a small mistake in above program , the below is the correct one's...........
#include<stdio.h>
#include<conio.h>
void main()
{
int m;
clrscr();
printf("enter the lines :");
scanf("%d",&m);
for(int i=1;i<=m;i+=2)
{
printf("*");
for(int j=-2;j<=i;j+=2)
printf("*");
printf("*\n");
}
getch();
}
thank u
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
In cryptography, you could often break the algorithm if you know what was the original (plain) text that was encoded into the current ciphertext. This is called the plain text attack. In this simple problem, we illustrate the plain text attack on a simple substitution cipher encryption, where you know each letter has been substituted with a different letter from the alphabet but you don’t know what that letter is. You are given the cipherText as the input string to the function getwordSets(). You know that a plain text "AMMUNITION" occurs somewhere in this cipher text. Now, you have to find out which sets of characters corresponds to the encrypted form of the "AMMUNITION". You can assume that the encryption follows simple substitution only. [Hint: You could use the pattern in the "AMMUNITION" like MM occurring twice together to identify this]
What is conio h in c?
will u please send me the placement papers to my mail???????????????????
What is the value of h?
Hai sir, I had planned to write the NIC scientific engineer exam , plz post the sample question......
what is the role you expect in software industry?
What are the advantages of using new operator as compared to the function malloc ()?
What are # preprocessor operator in c?
What is a char c?
Why pointers are used?
Is printf a keyword?
What are the different types of endless loops?
Explain can static variables be declared in a header file?
What are high level languages like C and FORTRAN also known as?
What is queue in c?