Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Subject: Programming & Problem Solving Class: MCA & (1st Semester,2013-2014)
Practical Assignment-01
(Elementary Programming Problems for Beginners)
INSTRUCTIONS
Write comment to make your programs readable.
Use descriptive variables in your programs(Name of the variables should
show their purposes)
PROGRAMS LIST
1
Assignment-1
2
Assignment-1
1 2 3
1 2
1
36. WAP to print the following patterns(There is a space between two
digits.)
1
2 1 2
3 2 1 2 3
4 3 2 1 2 3 4
5 4 3 2 1 2 3 4 5
6 5 4 3 2 1 2 3 4 5 6
7 6 5 4 3 2 1 2 3 4 5 6 7
38. WAP to print the following patterns (There is a space between two
stars.)
1
2 1
3 2 1
4 3 2 1
4
Assignment-1
5 4 3 2 1
6 5 4 3 2 1
7 6 5 4 3 2 1
39. WAP to print the following patterns (There is a space between two
stars.)
1
1 2 1
1 2 3 2 1
1 2 3 4 3 2 1
1 2 3 4 5 4 3 2 1
1 2 3 4 5 6 5 4 3 2 1
1 2 3 4 5 6 7 6 5 4 3 2 1
1 2 3 4 5 6 7 8 7 6 5 4 3 2 1
1 2 3 4 5 6 7 8 9 8 7 6 5 4 3 2 1
40. WAP to print the following patterns (There is a space between two
stars.)
1 2 3 4 5 6 7 8 9 8 7 6 5 4 3 2 1
1 2 3 4 5 6 7 8 7 6 5 4 3 2 1
1 2 3 4 5 6 7 6 5 4 3 2 1
1 2 3 4 5 6 5 4 3 2 1
1 2 3 4 5 4 3 2 1
1 2 3 4 3 2 1
1 2 3 2 1
1 2 1
1
41. WAP to print the following patterns (There is a space between two
stars.)
* *
* * * * * *
5
Assignment-1
* * * * * * * * * *
* * * * * * * * * * *
42. WAP to print the following patterns (There is a space between two
stars.)
* * * * *
* * * *
* * *
* *
*
* *
* * *
* * * *
* * * * *
43. WAP to print the following patterns (There is a space between two
stars.)
* *
* *
* * * *
* * * *
* * * * *
* * * *
* * * *
* *
* *
6
Assignment-1
Prepared By
Manoj Wairya
Associate Professor
Department of Computer Science & Engineering
Motilal Nehru National Institute of Technology,Allahabad