Skip to content

Instantly share code, notes, and snippets.

@BhaveshSGupta
Last active April 29, 2020 06:09
Show Gist options
  • Save BhaveshSGupta/cab5c5c222d1e8201307d1644850426d to your computer and use it in GitHub Desktop.
Save BhaveshSGupta/cab5c5c222d1e8201307d1644850426d to your computer and use it in GitHub Desktop.
1. WAP to take input from user, m and n, character and print a matrix of mxn characters.
2. WAP to print the following pattern. The height of triangle to be given by the user.
*
***
*****
*******
*********
2.1 WAP to print the following pattern
*
* *
* *
* *
*********
3. WAP to print the following pattern.
*****
* *
* *
* *
*****
4. WAP to print the following pattern
*****
*****
*****
*****
*****
5.WAP to print the following pattern
*****
* *
* *
* *
*****
6.WAP to print the following pattern
*****
*****
*****
*****
*****
7. WAP to print the following pattern
*****
* *
* *
* *
*****
8. WAP to print the following pattern, the star in middle are the diagonals of the parallelogram
*****
** **
* * *
** **
*****
9. By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. WAP to find the 51th prime number.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment