Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Loading...
User Settings
close menu
Welcome to Scribd!
Upload
Read for free
FAQ and support
Language (EN)
Sign in
0 ratings
0% found this document useful (0 votes)
12 views
Week 3 Assignment
Uploaded by
reverbtales
AI-enhanced
Copyright:
© All Rights Reserved
Available Formats
Download
as DOCX, PDF, TXT or read online from Scribd
Download
Save
Save WEEK 3 ASSIGNMENT For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Week 3 Assignment
Uploaded by
reverbtales
0 ratings
0% found this document useful (0 votes)
12 views
7 pages
AI-enhanced title
Document Information
click to expand document information
Original Title
WEEK 3 ASSIGNMENT
Copyright
© © All Rights Reserved
Available Formats
DOCX, PDF, TXT or read online from Scribd
Share this document
Share or Embed Document
Sharing Options
Share on Facebook, opens a new window
Facebook
Share on Twitter, opens a new window
Twitter
Share on LinkedIn, opens a new window
LinkedIn
Share with Email, opens mail client
Email
Copy link
Copy link
Did you find this document useful?
0%
0% found this document useful, Mark this document as useful
0%
0% found this document not useful, Mark this document as not useful
Is this content inappropriate?
Report
Copyright:
© All Rights Reserved
Available Formats
Download
as DOCX, PDF, TXT or read online from Scribd
Download now
Download as docx, pdf, or txt
Save
Save WEEK 3 ASSIGNMENT For Later
0 ratings
0% found this document useful (0 votes)
12 views
7 pages
Week 3 Assignment
Uploaded by
reverbtales
AI-enhanced title
Copyright:
© All Rights Reserved
Available Formats
Download
as DOCX, PDF, TXT or read online from Scribd
Save
Save WEEK 3 ASSIGNMENT For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download as docx, pdf, or txt
Jump to Page
You are on page 1
of 7
Search inside document
WEEK 3 ASSIGNMENT • Pattern 1 package com.company.
WEEK3; public class pattern1 { public
static void main(String[] args) { int n=4; for (int i = 0; i <n; i++) { for (int j = 0; j <n; j++)
{ System.out.print("*"); } System.out.println(); } } } • Pattern2 package com.company.WEEK3; public
class pattern2 { public static void main(String[] args) { int n=4; //first one for (int i = 1; i <=n; i++) { for
(int j = 1; j <= n; j++) { System.out.print(j); } System.out.println(); } System.out.println(); //second one
for (int i = 1; i <=n; i++) { for (int j = 1; j <= n; j++) { System.out.print(i); } System.out.println(); } } }
• Pattern 3 package com.company.WEEK3; public class pattern3 { public static void main(String[]
args) { int n=4; //first one for (int i = 4; i >0; i--) { for (int j = 4; j >0; j--) { System.out.print(j); //
System.out.print(i); } System.out.println(); } System.out.println(); //second one for (int i = 4; i >0; i--)
{ for (int j = 4; j >0; j--) { System.out.print(i); } System.out.println(); } } } • Pattern 4 package
com.company.WEEK3; public class pattern4 { public static void main(String[] args) { int n=4; for (int i =
4; i >0; i--) { for (int j = 1; j <=i; j++) { System.out.print("*"); } System.out.println(); } } }
• Pattern 5 package com.company.WEEK3; public class pattern5 { public static void main(String[]
args) { int n=4; //first one for (int i = 4; i >0; i--) { for (int j = 1; j <=i; j++) { System.out.print(i); }
System.out.println(); } System.out.println(); //second one for (int i = 4; i >0; i--) { for (int j = 1; j <=i; j++)
{ System.out.print(j); } System.out.println(); } } } • Pattern 6 package com.company.WEEK3; public
class pattern6 { public static void main(String[] args) { int n=4; //first one for (int i = 1; i <=n; i++) { for
(int j = i; j <=n; j++) { System.out.print(i); } System.out.println(); } System.out.println(); //second one for
(int i = 1; i <=n; i++) { for (int j = n; j >=i; j--) { System.out.print(j); } System.out.println(); } } }
• Pattern 7 package com.company.WEEK3; public class pattern7 { public static void main(String[]
args) { int n=4; //first one for (int i = 1; i <=n; i++) { for (int j = 1; j <=n; j++) { char ch= (char) ('A' +i -1);
System.out.print(ch); } System.out.println(); } System.out.println(); //second one for (int i = 1; i <=n; i+
+) { for (int j = 1; j <=n; j++) { char ch= (char) ('D' - i +1); System.out.print(ch); } System.out.println(); } }
} • Pattern 8 package com.company.WEEK3; public class pattern8 { public static void main(String[]
args) { int n=4; //first one for (int i = 4; i >0; i--) { for (int j = 1; j <=i; j++) { char ch= (char) ('A' + i - 1);
System.out.print(ch); } System.out.println(); } System.out.println(); //second one for (int i = 4; i >0; i--)
{ for (int j = 1; j <=i; j++) { char ch= (char) ('A' +j -1); System.out.print(ch);
} System.out.println(); } System.out.println(); //third one for (int i = 1; i <=n; i++) { for (int j = n; j >=i; j--)
{ char ch= (char) ('A' +j -1); System.out.print(ch); } System.out.println(); } } } • Pattern 9 package
com.company.WEEK3; public class pattern9 { public static void main(String[] args) { int n=4; //first one
for (int i = 4; i >0; i--) { int space=n-i; while (space>=0) { System.out.print(" "); space--; } for (int j = 1; j
<=i; j++) { System.out.print(j); } System.out.println(); } System.out.println(); //second one for (int i = 1; i
<=n; i++) { int space=i-1; while (space>=0) { System.out.print(" "); space--; } for (int j = n; j >=i; j--)
{ System.out.print(j); } System.out.println(); } } }
• Pattern 10 package com.company.WEEK3; public class pattern10 { public static void main(String[]
args) { int n=4; for (int i = 1; i <=n; i++) { int space=i-1; while (space>0) { System.out.print(" "); space--;
} for (int j = 1; j <=i; j++) { System.out.print("*"); } System.out.println(); } for (int i = 4; i >0; i--) { int
space=n-1; while (space>n-i+1) { System.out.print(" "); space--; } for (int j = 1; j <i; j++)
{ System.out.print("*"); } System.out.println(); } } } • Pattern 11 package com.company.WEEK3; public
class pattern11 { public static void main(String[] args) { int n=4; for (int i = 1; i <=n; i++) { int space=n-i;
while (space>0) { System.out.print(" "); space--; } for (int j = 1; j <=i; j++) { System.out.print("* "); }
System.out.println(); } } } • Pattern 12 package com.company.WEEK3; public class pattern12 { public
static void main(String[] args) { int n=4; for (int i = 1; i <=n; i++) { int space=n-i; while (space>0)
{ System.out.print(" "); space--; } for (int j = 1; j <=i; j++) { System.out.print("* "); }
System.out.println(); } for (int i = 4; i >0; i--) { int space=1; while (space<=n-i+1) { System.out.print(" ");
space++; } for (int j = 1; j <i; j++) { System.out.print("* "); } System.out.println(); } } }
You might also like
java week 10
Document
6 pages
java week 10
dharanishsriraml.22bir
No ratings yet
Dhanush (Assissgnment)
Document
2 pages
Dhanush (Assissgnment)
Dhanush Arjunan
No ratings yet
Patterns
Document
6 pages
Patterns
bishaljaiswal515
No ratings yet
Pattern
Document
9 pages
Pattern
pc651719
No ratings yet
Pattern Programs
Document
6 pages
Pattern Programs
Veer Bahadur
No ratings yet
1. Pattern Shape
Document
5 pages
1. Pattern Shape
bernardmarcella1
No ratings yet
Java
Document
9 pages
Java
zainabfatima5452
No ratings yet
package looppractice
Document
23 pages
package looppractice
nishita6978
No ratings yet
CPSC Lecture8
Document
122 pages
CPSC Lecture8
Albert Chang
No ratings yet
Class 22
Document
9 pages
Class 22
M
No ratings yet
Java Pattern Programs Class 12 - 9c22d642 c70b 4e88 Acfe Aa50eb8440d7
Document
8 pages
Java Pattern Programs Class 12 - 9c22d642 c70b 4e88 Acfe Aa50eb8440d7
swati2gupta16
No ratings yet
Java - Introduction To Programming: Patterns - Part 2
Document
8 pages
Java - Introduction To Programming: Patterns - Part 2
Abhinav Ashish
No ratings yet
Java Lecture 6
Document
8 pages
Java Lecture 6
Somit Jaiswal
No ratings yet
Lab 1.1
Document
6 pages
Lab 1.1
athar
No ratings yet
Assignment 5
Document
4 pages
Assignment 5
megh94001
No ratings yet
Programming in Java: Assignment I
Document
11 pages
Programming in Java: Assignment I
Ashish Verma
No ratings yet
Display Patterns
Document
10 pages
Display Patterns
Siripi Reddy Mohan Reddy
No ratings yet
Coding Assignment 18-WPS Office
Document
9 pages
Coding Assignment 18-WPS Office
tamj tamj
No ratings yet
Irjet V6i162 PDF
Document
7 pages
Irjet V6i162 PDF
raghunath sastry
No ratings yet
Java Sample Programs
Document
17 pages
Java Sample Programs
Valerie Vallo
No ratings yet
DEVJAVA
Document
26 pages
DEVJAVA
Anonymous aPiGrujKA
No ratings yet
Practice Problems of Patterns in Java
Document
7 pages
Practice Problems of Patterns in Java
Gaurav Mittal
No ratings yet
Document1 Sample Java Code
Document
47 pages
Document1 Sample Java Code
Arunadevi Rajmohan
No ratings yet
Jo
Document
1 page
Jo
hamzaaftab1110
No ratings yet
Public Class Program
Document
3 pages
Public Class Program
leni7setiani
No ratings yet
2
Document
2 pages
2
sfsicseclass10
No ratings yet
Pattern Programming 1 1 Lyst9038 Lyst9468
Document
28 pages
Pattern Programming 1 1 Lyst9038 Lyst9468
jflksdjf
No ratings yet
Lab Manual Object Oriented Programming: University of Lahore, Sargodha Campus
Document
29 pages
Lab Manual Object Oriented Programming: University of Lahore, Sargodha Campus
M.Bilal Shahid
No ratings yet
Asterisk Patterns Using Flow Controls (Java)
Document
22 pages
Asterisk Patterns Using Flow Controls (Java)
Darshana Prabath
No ratings yet
WS - 7 General Pro - Key
Document
5 pages
WS - 7 General Pro - Key
anishbarge23
No ratings yet
What Does The Following Program Output ?: Nama: Aldi Kristianto Kelas: 2 Elektro B Nim: 1102007 No Absen: 06
Document
5 pages
What Does The Following Program Output ?: Nama: Aldi Kristianto Kelas: 2 Elektro B Nim: 1102007 No Absen: 06
Aldi
No ratings yet
SP23-BSE-022 Task3
Document
6 pages
SP23-BSE-022 Task3
Waleed
No ratings yet
Java Nested
Document
2 pages
Java Nested
meermind54
No ratings yet
Java Examples I Fall 2010
Document
5 pages
Java Examples I Fall 2010
Tabi
No ratings yet
Allpatterns
Document
4 pages
Allpatterns
koyilakuntlamahaboobi
No ratings yet
OOP'S Lab Assignment 1
Document
14 pages
OOP'S Lab Assignment 1
Madhvendra Dixit
No ratings yet
Java Program To Find Largest of Three Numbers
Document
10 pages
Java Program To Find Largest of Three Numbers
Vyshnavi Thottempudi
No ratings yet
Oops Lab Manual 2vazur
Document
48 pages
Oops Lab Manual 2vazur
technicalgamertamil007
No ratings yet
Nested loop Programs 1
Document
21 pages
Nested loop Programs 1
Sara Mahajan
No ratings yet
JavaN2N Codigg Complete in 30 Min
Document
9 pages
JavaN2N Codigg Complete in 30 Min
Samurai
No ratings yet
Java Lab Experiments
Document
20 pages
Java Lab Experiments
rehaanparkar
No ratings yet
Factorial
Document
17 pages
Factorial
SENTHILNAATHAN KANNAPPAN
No ratings yet
Poceni Kodovi Za Programe JAVA
Document
7 pages
Poceni Kodovi Za Programe JAVA
Срђан Раденовић
100% (1)
Java - Introduction To Programming: Patterns - Part 1
Document
13 pages
Java - Introduction To Programming: Patterns - Part 1
Abhinav Ashish
No ratings yet
Umer Irfan Roll No: 93: Public Class Public Static Void
Document
14 pages
Umer Irfan Roll No: 93: Public Class Public Static Void
umar03029452584
No ratings yet
المستند
Document
3 pages
المستند
حسان فضل الشعيبي
No ratings yet
Java Programming
Document
26 pages
Java Programming
supriya
100% (2)
Medina - DATASTRUC - LAB EXERCISE 1 - ARRAYS
Document
4 pages
Medina - DATASTRUC - LAB EXERCISE 1 - ARRAYS
Glyn Medina
No ratings yet
Codes 3 4 5
Document
22 pages
Codes 3 4 5
api-294649007
No ratings yet
Print The Following Pattern Using 1) For 2) While Using While Loop: Public Class Public Static Void Int Int While
Document
4 pages
Print The Following Pattern Using 1) For 2) While Using While Loop: Public Class Public Static Void Int Int While
Niranjana
No ratings yet
KUTTY
Document
37 pages
KUTTY
rajalakshmishankar4
No ratings yet
Pattern Questions
Document
4 pages
Pattern Questions
BABLU GUPTA
No ratings yet
Programs on patterns
Document
6 pages
Programs on patterns
noneofforme
No ratings yet
Pattern Programs in Java Number Patterns
Document
33 pages
Pattern Programs in Java Number Patterns
Hadraoui Zakaria
No ratings yet
Oop in Java Diamond
Document
9 pages
Oop in Java Diamond
ali jawad
No ratings yet
Program Variasi Bintang Java
Document
7 pages
Program Variasi Bintang Java
Abby AR
100% (1)
Java Lab 2
Document
5 pages
Java Lab 2
معتز العجيلي
No ratings yet
OOPS FULL LAB MANUAL-01
Document
43 pages
OOPS FULL LAB MANUAL-01
santhikala
No ratings yet
Public Class Programa1 (
Document
16 pages
Public Class Programa1 (
Vibmec123
No ratings yet
150+ C Pattern Programs
From Everand
150+ C Pattern Programs
Hernando Abella
No ratings yet
XHTML, Css & Javascript Web Developer Applicant Questions
Document
7 pages
XHTML, Css & Javascript Web Developer Applicant Questions
Ashwani_Kumar_2709
No ratings yet
Automation Anywhere Content
Document
3 pages
Automation Anywhere Content
Kathyayani
No ratings yet
Time and Labor Overview 1217515239320101 9
Document
35 pages
Time and Labor Overview 1217515239320101 9
iam_narayanan
100% (1)
Coypu
Document
20 pages
Coypu
perfect
No ratings yet
RPVM 4.3 - Faq
Document
7 pages
RPVM 4.3 - Faq
Amul Verma
No ratings yet
SWL Server Interview Questions Part 2
Document
12 pages
SWL Server Interview Questions Part 2
Iván Madrid
No ratings yet
Python 3 Orientado A Objeto
Document
405 pages
Python 3 Orientado A Objeto
Jack Lummer
100% (20)
WordPress Hosting Training
Document
18 pages
WordPress Hosting Training
matinongnikkialbert
No ratings yet
PDF 6 Gestion de Estrategias Disruptivas
Document
5 pages
PDF 6 Gestion de Estrategias Disruptivas
hugo2pivaral
No ratings yet
Operation SMAVIA Recording Server Preloaded en PDF
Document
64 pages
Operation SMAVIA Recording Server Preloaded en PDF
Adrian Deoanca
No ratings yet
Chapter1 Introduction To Information System
Document
31 pages
Chapter1 Introduction To Information System
Dilini Dakshika Herath
No ratings yet
Software Quality Assurance in Extreme Programming
Document
5 pages
Software Quality Assurance in Extreme Programming
Ijesat Journal
No ratings yet
Vray Manual For Sketchup
Document
2 pages
Vray Manual For Sketchup
aizulmi
No ratings yet
UVM ShinyObject
Document
18 pages
UVM ShinyObject
Mila Cohen
No ratings yet
USB-MIDI Setup Guide: About The Software
Document
6 pages
USB-MIDI Setup Guide: About The Software
ladydalady
No ratings yet
C200
Document
2 pages
C200
duomaxval
No ratings yet
An A-Z Index of The Command Line: Windows NT/XP
Document
5 pages
An A-Z Index of The Command Line: Windows NT/XP
eratul
No ratings yet
SBS - M2 - 03 - New Drawing
Document
6 pages
SBS - M2 - 03 - New Drawing
Yae Min Soe
No ratings yet
Ccito1-Introduction To Computing 2023
Document
232 pages
Ccito1-Introduction To Computing 2023
Ray Niel Liquisen Valencia
No ratings yet
Uc2-Computerized Reservation System Sample Test
Document
4 pages
Uc2-Computerized Reservation System Sample Test
Ayen Malabarbas
No ratings yet
Public Works Authority (Ashghal) : Detailed Design
Document
1 page
Public Works Authority (Ashghal) : Detailed Design
JericFuentes
No ratings yet
Groovy Programming
Document
2 pages
Groovy Programming
ravi rama
No ratings yet
Manipulating Data
Document
5 pages
Manipulating Data
mascaruda
No ratings yet
Slide Assembly Computer Architecture
Document
27 pages
Slide Assembly Computer Architecture
hoangtrinh240705
No ratings yet
Rahul Yadav: Work Experience
Document
4 pages
Rahul Yadav: Work Experience
Zac Schnider
No ratings yet
Supplementary Specification Template
Document
12 pages
Supplementary Specification Template
Hiếu Shadows
No ratings yet
Dr. Anil Mishra
Document
1 page
Dr. Anil Mishra
Ayush Bisht
No ratings yet
Visual Basic 6.0
Document
28 pages
Visual Basic 6.0
Boros Meh Meh
No ratings yet
Xojopi: Programming The Raspberry Pi With Xojo
Document
88 pages
Xojopi: Programming The Raspberry Pi With Xojo
Purushottam pawar
No ratings yet
Applying Halstead Software Science On Different Programming Languages For Analyzing Software Complexity
Document
5 pages
Applying Halstead Software Science On Different Programming Languages For Analyzing Software Complexity
Eman Alkurdi
No ratings yet