Skip to content

This site is to share the solution of prgramming and quiz assignment given during the Programming In java by Prof. Debasis Samantha on NPTEL.

Notifications You must be signed in to change notification settings

Raja8946/Programming_In_Java_NPTEL

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java Week 8:Q1 Write a program which will print a pyramid of "" 's of height "n" and print the number of "" 's in the pyramid.

For example:

input : 5
output:  

        *  
      * * *
    * * * * * 
  * * * * * * *
* * * * * * * * * 
25

Java Week 8:Q2 Write a program which will print a pascal pyramid of "*" 's of height "l" .

For example:

input: 8

output :
       *      
      * * 
     * * *      
    * * * *     
   * * * * *   
  * * * * * * 
 * * * * * * * 
* * * * * * * *

Java Week 8:Q3 Write a program which will print a pyramid of "numbers" 's of height "n" and print the sum of all number's in the pyramid.

For example:

input: 5

output: 

        1       
      1 2 3      
    1 2 3 4 5    
  1 2 3 4 5 6 7 
1 2 3 4 5 6 7 8 9 
95

Java Week 8:Q4 Write a program to print symmetric Pascal's triangle of "*" 's of height "l" of odd length . If input "l" is even then your program will print "Invalid line number".

For example:

input : 5

output:
  *  
 * *
* * *
 * *
  *
  
input : 6

output:

Invalid line number

Java Week 8:Q5 Write a program to display any digit(n) from 0-9 using "7 segment display".


For example:

input : 5

output :
 _ 
|_ 
 _|


input : 4

output :

|_|
  |

About

This site is to share the solution of prgramming and quiz assignment given during the Programming In java by Prof. Debasis Samantha on NPTEL.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published