SlideShare a Scribd company logo
a)
A.java
public class A {
public static void main(String[] args) {
for (int i = 0; i <= 8; i++)
{
for (int j = 0; j < i; j++)
{
System.out.print(" # ");
}
System.out.println(" ");
}
}
}
__________________________________________________
Output:
#
# #
# # #
# # # #
# # # # #
# # # # # #
# # # # # # #
# # # # # # # #
____________________________________________________
b)
B.java
public class B {
public static void main(String[] args) {
for (int i = 8; i >= 1; i--)
{
for (int j = 0; j < i; j++)
{
System.out.print(" # ");
}
System.out.println(" ");
}
}
}
______________________________________________
Output:
# # # # # # # #
# # # # # # #
# # # # # #
# # # # #
# # # #
# # #
# #
#
____________________________________________________
C)
C.java
public class C {
public static void main(String[] args) {
for (int i = 0; i < 8; i++)
{
for (int j = 1; j <= 8; j++)
{
if (i < j)
System.out.print("# ");
else
System.out.print(" ");
}
System.out.println();
}
}
}
________________________________________________
Output:
# # # # # # # #
# # # # # # #
# # # # # #
# # # # #
# # # #
# # #
# #
#
___________________________________________________
d)
D.java
public class D {
public static void main(String[] args) {
for (int i = 8; i >= 0; i--)
{
for (int j = 0; j < 8; j++)
{
if (i > j)
System.out.print(" ");
else
System.out.print(" #");
}
System.out.println(" ");
}
}
}
___________________________________
Output:
#
# #
# # #
# # # #
# # # # #
# # # # # #
# # # # # # #
# # # # # # # #
_____________________________________________
e)
E.java
public class E {
public static void main(String[] args) {
int n = 7;
for (int i = 0; i < n; i++)
{
for (int j = 0; j < n; j++)
{
if ( (i==0) || (j==0) || (i == n - 1) || (j == n - 1) )
{
System.out.print(" #");
}
else
{
System.out.print(" ");
}
} System.out.println();
}
}
}
_______________________________________
Output:
# # # # # # #
# #
# #
# #
# #
# #
# # # # # # #
_____________________________________
f)
package org.students;
public class F {
public static void main(String[] args) {
int n = 7;
for (int i = 0; i < n; i++)
{
for (int j = 0; j < n; j++)
{
if ( (i==j) || (i==0) || (i == n - 1))
{
System.out.print(" # ");
}
else
{
System.out.print(" ");
}
} System.out.println();
}
}
}
_______________________________________________
Output:
# # # # # # #
#
#
#
#
#
# # # # # # #
_____________________________________________
g)
G.java
public class G {
public static void main(String[] args) {
int n = 7;
for (int i = 0; i < n; i++)
{
for (int j = 0; j < n; j++)
{
if ( (i==0) || (i == n - 1) || (i + j == n - 1) )
{
System.out.print(" # ");
}
else
{
System.out.print(" ");
}
} System.out.println();
}
}
}
_______________________________________
Output:
# # # # # # #
#
#
#
#
#
# # # # # # #
_____________________________________________
h)
H.java
public class H {
public static void main(String[] args) {
int n = 7;
for (int i = 0; i < n; i++)
{
for (int j = 0; j < n; j++)
{
if((i == 0) || (i == j) || (i + j == n - 1) || (i == n - 1))
{
System.out.print(" # ");
}
else
{
System.out.print(" ");
}
} System.out.println();
}
}
}
_____________________________________________
Output:
# # # # # # #
# #
# #
#
# #
# #
# # # # # # #
___________________________________________
I)
I.java
public class I {
public static void main(String[] args) {
int n = 7;
for (int i = 0; i < n; i++)
{
for (int j = 0; j < n; j++)
{
if((i == 0) || (j == 0) || (i == n - 1) || (j == n - 1)|| (i == j) || (i + j == n - 1))
{
System.out.print(" # ");
}
else
{
System.out.print(" ");
}
} System.out.println();
}
}
}
____________________________________________
Output:
# # # # # # #
# # # #
# # # #
# # #
# # # #
# # # #
# # # # # # #
___________________________________________________
Solution
a)
A.java
public class A {
public static void main(String[] args) {
for (int i = 0; i <= 8; i++)
{
for (int j = 0; j < i; j++)
{
System.out.print(" # ");
}
System.out.println(" ");
}
}
}
__________________________________________________
Output:
#
# #
# # #
# # # #
# # # # #
# # # # # #
# # # # # # #
# # # # # # # #
____________________________________________________
b)
B.java
public class B {
public static void main(String[] args) {
for (int i = 8; i >= 1; i--)
{
for (int j = 0; j < i; j++)
{
System.out.print(" # ");
}
System.out.println(" ");
}
}
}
______________________________________________
Output:
# # # # # # # #
# # # # # # #
# # # # # #
# # # # #
# # # #
# # #
# #
#
____________________________________________________
C)
C.java
public class C {
public static void main(String[] args) {
for (int i = 0; i < 8; i++)
{
for (int j = 1; j <= 8; j++)
{
if (i < j)
System.out.print("# ");
else
System.out.print(" ");
}
System.out.println();
}
}
}
________________________________________________
Output:
# # # # # # # #
# # # # # # #
# # # # # #
# # # # #
# # # #
# # #
# #
#
___________________________________________________
d)
D.java
public class D {
public static void main(String[] args) {
for (int i = 8; i >= 0; i--)
{
for (int j = 0; j < 8; j++)
{
if (i > j)
System.out.print(" ");
else
System.out.print(" #");
}
System.out.println(" ");
}
}
}
___________________________________
Output:
#
# #
# # #
# # # #
# # # # #
# # # # # #
# # # # # # #
# # # # # # # #
_____________________________________________
e)
E.java
public class E {
public static void main(String[] args) {
int n = 7;
for (int i = 0; i < n; i++)
{
for (int j = 0; j < n; j++)
{
if ( (i==0) || (j==0) || (i == n - 1) || (j == n - 1) )
{
System.out.print(" #");
}
else
{
System.out.print(" ");
}
} System.out.println();
}
}
}
_______________________________________
Output:
# # # # # # #
# #
# #
# #
# #
# #
# # # # # # #
_____________________________________
f)
package org.students;
public class F {
public static void main(String[] args) {
int n = 7;
for (int i = 0; i < n; i++)
{
for (int j = 0; j < n; j++)
{
if ( (i==j) || (i==0) || (i == n - 1))
{
System.out.print(" # ");
}
else
{
System.out.print(" ");
}
} System.out.println();
}
}
}
_______________________________________________
Output:
# # # # # # #
#
#
#
#
#
# # # # # # #
_____________________________________________
g)
G.java
public class G {
public static void main(String[] args) {
int n = 7;
for (int i = 0; i < n; i++)
{
for (int j = 0; j < n; j++)
{
if ( (i==0) || (i == n - 1) || (i + j == n - 1) )
{
System.out.print(" # ");
}
else
{
System.out.print(" ");
}
} System.out.println();
}
}
}
_______________________________________
Output:
# # # # # # #
#
#
#
#
#
# # # # # # #
_____________________________________________
h)
H.java
public class H {
public static void main(String[] args) {
int n = 7;
for (int i = 0; i < n; i++)
{
for (int j = 0; j < n; j++)
{
if((i == 0) || (i == j) || (i + j == n - 1) || (i == n - 1))
{
System.out.print(" # ");
}
else
{
System.out.print(" ");
}
} System.out.println();
}
}
}
_____________________________________________
Output:
# # # # # # #
# #
# #
#
# #
# #
# # # # # # #
___________________________________________
I)
I.java
public class I {
public static void main(String[] args) {
int n = 7;
for (int i = 0; i < n; i++)
{
for (int j = 0; j < n; j++)
{
if((i == 0) || (j == 0) || (i == n - 1) || (j == n - 1)|| (i == j) || (i + j == n - 1))
{
System.out.print(" # ");
}
else
{
System.out.print(" ");
}
} System.out.println();
}
}
}
____________________________________________
Output:
# # # # # # #
# # # #
# # # #
# # #
# # # #
# # # #
# # # # # # #
___________________________________________________

More Related Content

Similar to a)A.javapublic class A {   public static void main(String[] ar.pdf

Computer java programs
Computer java programsComputer java programs
Computer java programs
ADITYA BHARTI
 
Review Questions for Exam 10182016 1. public class .pdf
Review Questions for Exam 10182016 1. public class .pdfReview Questions for Exam 10182016 1. public class .pdf
Review Questions for Exam 10182016 1. public class .pdf
mayorothenguyenhob69
 
Java Tutorial: Part 1. Getting Started
Java Tutorial: Part 1. Getting StartedJava Tutorial: Part 1. Getting Started
Java Tutorial: Part 1. Getting Started
Svetlin Nakov
 
Sharable_Java_Python.pdf
Sharable_Java_Python.pdfSharable_Java_Python.pdf
Sharable_Java_Python.pdf
ICADCMLTPC
 
Java AssignmentWrite a program using sortingsorting bubble,sele.pdf
Java AssignmentWrite a program using sortingsorting bubble,sele.pdfJava AssignmentWrite a program using sortingsorting bubble,sele.pdf
Java AssignmentWrite a program using sortingsorting bubble,sele.pdf
eyewatchsystems
 
Operators
OperatorsOperators
Operators
vvpadhu
 
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_15-Feb-2021_L6-...
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_15-Feb-2021_L6-...WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_15-Feb-2021_L6-...
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_15-Feb-2021_L6-...
MaruMengesha
 
Fnt software solutions placement paper
Fnt software solutions placement paperFnt software solutions placement paper
Fnt software solutions placement paperfntsofttech
 
ma project
ma projectma project
ma projectAisu
 
DS LAB RECORD.docx
DS LAB RECORD.docxDS LAB RECORD.docx
DS LAB RECORD.docx
davinci54
 
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_17-Feb-2021_L8-...
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_17-Feb-2021_L8-...WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_17-Feb-2021_L8-...
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_17-Feb-2021_L8-...
MaruMengesha
 
java program assigment -2
java program assigment -2java program assigment -2
java program assigment -2
Ankit Gupta
 
Factors.javaimport java.io.; import java.util.Scanner; class .pdf
Factors.javaimport java.io.; import java.util.Scanner; class .pdfFactors.javaimport java.io.; import java.util.Scanner; class .pdf
Factors.javaimport java.io.; import java.util.Scanner; class .pdf
deepakangel
 
Java Programs
Java ProgramsJava Programs
Java Programs
AnjaliSoorej
 
Java Programs
Java ProgramsJava Programs
Java Programs
vvpadhu
 
Write a program (any language) to randomly generate the following se.pdf
Write a program (any language) to randomly generate the following se.pdfWrite a program (any language) to randomly generate the following se.pdf
Write a program (any language) to randomly generate the following se.pdf
archanaemporium
 

Similar to a)A.javapublic class A {   public static void main(String[] ar.pdf (20)

Java file
Java fileJava file
Java file
 
Computer java programs
Computer java programsComputer java programs
Computer java programs
 
Review Questions for Exam 10182016 1. public class .pdf
Review Questions for Exam 10182016 1. public class .pdfReview Questions for Exam 10182016 1. public class .pdf
Review Questions for Exam 10182016 1. public class .pdf
 
Java Tutorial: Part 1. Getting Started
Java Tutorial: Part 1. Getting StartedJava Tutorial: Part 1. Getting Started
Java Tutorial: Part 1. Getting Started
 
Sharable_Java_Python.pdf
Sharable_Java_Python.pdfSharable_Java_Python.pdf
Sharable_Java_Python.pdf
 
Java AssignmentWrite a program using sortingsorting bubble,sele.pdf
Java AssignmentWrite a program using sortingsorting bubble,sele.pdfJava AssignmentWrite a program using sortingsorting bubble,sele.pdf
Java AssignmentWrite a program using sortingsorting bubble,sele.pdf
 
Operators
OperatorsOperators
Operators
 
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_15-Feb-2021_L6-...
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_15-Feb-2021_L6-...WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_15-Feb-2021_L6-...
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_15-Feb-2021_L6-...
 
Fnt software solutions placement paper
Fnt software solutions placement paperFnt software solutions placement paper
Fnt software solutions placement paper
 
ma project
ma projectma project
ma project
 
DS LAB RECORD.docx
DS LAB RECORD.docxDS LAB RECORD.docx
DS LAB RECORD.docx
 
Stars
StarsStars
Stars
 
Core java
Core javaCore java
Core java
 
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_17-Feb-2021_L8-...
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_17-Feb-2021_L8-...WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_17-Feb-2021_L8-...
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_17-Feb-2021_L8-...
 
java program assigment -2
java program assigment -2java program assigment -2
java program assigment -2
 
Java Unit 1 Project
Java Unit 1 ProjectJava Unit 1 Project
Java Unit 1 Project
 
Factors.javaimport java.io.; import java.util.Scanner; class .pdf
Factors.javaimport java.io.; import java.util.Scanner; class .pdfFactors.javaimport java.io.; import java.util.Scanner; class .pdf
Factors.javaimport java.io.; import java.util.Scanner; class .pdf
 
Java Programs
Java ProgramsJava Programs
Java Programs
 
Java Programs
Java ProgramsJava Programs
Java Programs
 
Write a program (any language) to randomly generate the following se.pdf
Write a program (any language) to randomly generate the following se.pdfWrite a program (any language) to randomly generate the following se.pdf
Write a program (any language) to randomly generate the following se.pdf
 

More from sudhinjv

1.Rule based detection 2.Statical anomaly detection1.Rule based de.pdf
1.Rule based detection 2.Statical anomaly detection1.Rule based de.pdf1.Rule based detection 2.Statical anomaly detection1.Rule based de.pdf
1.Rule based detection 2.Statical anomaly detection1.Rule based de.pdf
sudhinjv
 
14 = disease ff24 = carriers Ff25 chances that they will pro.pdf
14 = disease ff24 = carriers Ff25  chances that they will pro.pdf14 = disease ff24 = carriers Ff25  chances that they will pro.pdf
14 = disease ff24 = carriers Ff25 chances that they will pro.pdf
sudhinjv
 
Mosses, lichens are great indicators of radioactive pollution. They .pdf
  Mosses, lichens are great indicators of radioactive pollution. They .pdf  Mosses, lichens are great indicators of radioactive pollution. They .pdf
Mosses, lichens are great indicators of radioactive pollution. They .pdf
sudhinjv
 
10 million.Sensory conflict theory argues , The brightest light at.pdf
10 million.Sensory conflict theory argues , The brightest light at.pdf10 million.Sensory conflict theory argues , The brightest light at.pdf
10 million.Sensory conflict theory argues , The brightest light at.pdf
sudhinjv
 
We first find the slopes of the two lines 2M an.pdf
                     We first find the slopes of the two lines 2M an.pdf                     We first find the slopes of the two lines 2M an.pdf
We first find the slopes of the two lines 2M an.pdf
sudhinjv
 
SO2 is a gas that mixes with water to form sulfur.pdf
                     SO2 is a gas that mixes with water to form sulfur.pdf                     SO2 is a gas that mixes with water to form sulfur.pdf
SO2 is a gas that mixes with water to form sulfur.pdf
sudhinjv
 
1. Heterozygosity by migration calculated using the below formulaH.pdf
1. Heterozygosity by migration calculated using the below formulaH.pdf1. Heterozygosity by migration calculated using the below formulaH.pdf
1. Heterozygosity by migration calculated using the below formulaH.pdf
sudhinjv
 
1).Monohybrid cross between true breeding parents. Assume that the.pdf
1).Monohybrid cross between true breeding parents. Assume that the.pdf1).Monohybrid cross between true breeding parents. Assume that the.pdf
1).Monohybrid cross between true breeding parents. Assume that the.pdf
sudhinjv
 
1. Moving down a group, the electronegativity decreases due to the l.pdf
  1. Moving down a group, the electronegativity decreases due to the l.pdf  1. Moving down a group, the electronegativity decreases due to the l.pdf
1. Moving down a group, the electronegativity decreases due to the l.pdf
sudhinjv
 
The mercury liquid and the mercury(II) oxide are .pdf
                     The mercury liquid and the mercury(II) oxide are .pdf                     The mercury liquid and the mercury(II) oxide are .pdf
The mercury liquid and the mercury(II) oxide are .pdf
sudhinjv
 
1 Ans Bacteria are unicellular organisms that reproduce by cell divi.pdf
1 Ans Bacteria are unicellular organisms that reproduce by cell divi.pdf1 Ans Bacteria are unicellular organisms that reproduce by cell divi.pdf
1 Ans Bacteria are unicellular organisms that reproduce by cell divi.pdf
sudhinjv
 
1#include stdio.h#include stdlib.h#include assert.h .pdf
1#include stdio.h#include stdlib.h#include assert.h .pdf1#include stdio.h#include stdlib.h#include assert.h .pdf
1#include stdio.h#include stdlib.h#include assert.h .pdf
sudhinjv
 
Ques-6 answerThe clinical significance of beta-hemolytic (on blo.pdf
Ques-6 answerThe clinical significance of beta-hemolytic (on blo.pdfQues-6 answerThe clinical significance of beta-hemolytic (on blo.pdf
Ques-6 answerThe clinical significance of beta-hemolytic (on blo.pdf
sudhinjv
 
Valence electrons electrons at outer-most energy level.Effective.pdf
Valence electrons  electrons at outer-most energy level.Effective.pdfValence electrons  electrons at outer-most energy level.Effective.pdf
Valence electrons electrons at outer-most energy level.Effective.pdf
sudhinjv
 
What is storage mediaAns-C. the physical material on which a co.pdf
What is storage mediaAns-C. the physical material on which a co.pdfWhat is storage mediaAns-C. the physical material on which a co.pdf
What is storage mediaAns-C. the physical material on which a co.pdf
sudhinjv
 
Transactional model of communication states that if people are conne.pdf
Transactional model of communication states that if people are conne.pdfTransactional model of communication states that if people are conne.pdf
Transactional model of communication states that if people are conne.pdf
sudhinjv
 
What is the measure of the strength of the relationship between inde.pdf
What is the measure of the strength of the relationship between inde.pdfWhat is the measure of the strength of the relationship between inde.pdf
What is the measure of the strength of the relationship between inde.pdf
sudhinjv
 
Some of the SO32- is oxidized by atmospheric oxygen in air into SO42.pdf
Some of the SO32- is oxidized by atmospheric oxygen in air into SO42.pdfSome of the SO32- is oxidized by atmospheric oxygen in air into SO42.pdf
Some of the SO32- is oxidized by atmospheric oxygen in air into SO42.pdf
sudhinjv
 
Should begin with a letter and may contain additional letters and di.pdf
Should begin with a letter and may contain additional letters and di.pdfShould begin with a letter and may contain additional letters and di.pdf
Should begin with a letter and may contain additional letters and di.pdf
sudhinjv
 
#include iostream #include string #include iomanip #incl.pdf
#include iostream #include string #include iomanip #incl.pdf#include iostream #include string #include iomanip #incl.pdf
#include iostream #include string #include iomanip #incl.pdf
sudhinjv
 

More from sudhinjv (20)

1.Rule based detection 2.Statical anomaly detection1.Rule based de.pdf
1.Rule based detection 2.Statical anomaly detection1.Rule based de.pdf1.Rule based detection 2.Statical anomaly detection1.Rule based de.pdf
1.Rule based detection 2.Statical anomaly detection1.Rule based de.pdf
 
14 = disease ff24 = carriers Ff25 chances that they will pro.pdf
14 = disease ff24 = carriers Ff25  chances that they will pro.pdf14 = disease ff24 = carriers Ff25  chances that they will pro.pdf
14 = disease ff24 = carriers Ff25 chances that they will pro.pdf
 
Mosses, lichens are great indicators of radioactive pollution. They .pdf
  Mosses, lichens are great indicators of radioactive pollution. They .pdf  Mosses, lichens are great indicators of radioactive pollution. They .pdf
Mosses, lichens are great indicators of radioactive pollution. They .pdf
 
10 million.Sensory conflict theory argues , The brightest light at.pdf
10 million.Sensory conflict theory argues , The brightest light at.pdf10 million.Sensory conflict theory argues , The brightest light at.pdf
10 million.Sensory conflict theory argues , The brightest light at.pdf
 
We first find the slopes of the two lines 2M an.pdf
                     We first find the slopes of the two lines 2M an.pdf                     We first find the slopes of the two lines 2M an.pdf
We first find the slopes of the two lines 2M an.pdf
 
SO2 is a gas that mixes with water to form sulfur.pdf
                     SO2 is a gas that mixes with water to form sulfur.pdf                     SO2 is a gas that mixes with water to form sulfur.pdf
SO2 is a gas that mixes with water to form sulfur.pdf
 
1. Heterozygosity by migration calculated using the below formulaH.pdf
1. Heterozygosity by migration calculated using the below formulaH.pdf1. Heterozygosity by migration calculated using the below formulaH.pdf
1. Heterozygosity by migration calculated using the below formulaH.pdf
 
1).Monohybrid cross between true breeding parents. Assume that the.pdf
1).Monohybrid cross between true breeding parents. Assume that the.pdf1).Monohybrid cross between true breeding parents. Assume that the.pdf
1).Monohybrid cross between true breeding parents. Assume that the.pdf
 
1. Moving down a group, the electronegativity decreases due to the l.pdf
  1. Moving down a group, the electronegativity decreases due to the l.pdf  1. Moving down a group, the electronegativity decreases due to the l.pdf
1. Moving down a group, the electronegativity decreases due to the l.pdf
 
The mercury liquid and the mercury(II) oxide are .pdf
                     The mercury liquid and the mercury(II) oxide are .pdf                     The mercury liquid and the mercury(II) oxide are .pdf
The mercury liquid and the mercury(II) oxide are .pdf
 
1 Ans Bacteria are unicellular organisms that reproduce by cell divi.pdf
1 Ans Bacteria are unicellular organisms that reproduce by cell divi.pdf1 Ans Bacteria are unicellular organisms that reproduce by cell divi.pdf
1 Ans Bacteria are unicellular organisms that reproduce by cell divi.pdf
 
1#include stdio.h#include stdlib.h#include assert.h .pdf
1#include stdio.h#include stdlib.h#include assert.h .pdf1#include stdio.h#include stdlib.h#include assert.h .pdf
1#include stdio.h#include stdlib.h#include assert.h .pdf
 
Ques-6 answerThe clinical significance of beta-hemolytic (on blo.pdf
Ques-6 answerThe clinical significance of beta-hemolytic (on blo.pdfQues-6 answerThe clinical significance of beta-hemolytic (on blo.pdf
Ques-6 answerThe clinical significance of beta-hemolytic (on blo.pdf
 
Valence electrons electrons at outer-most energy level.Effective.pdf
Valence electrons  electrons at outer-most energy level.Effective.pdfValence electrons  electrons at outer-most energy level.Effective.pdf
Valence electrons electrons at outer-most energy level.Effective.pdf
 
What is storage mediaAns-C. the physical material on which a co.pdf
What is storage mediaAns-C. the physical material on which a co.pdfWhat is storage mediaAns-C. the physical material on which a co.pdf
What is storage mediaAns-C. the physical material on which a co.pdf
 
Transactional model of communication states that if people are conne.pdf
Transactional model of communication states that if people are conne.pdfTransactional model of communication states that if people are conne.pdf
Transactional model of communication states that if people are conne.pdf
 
What is the measure of the strength of the relationship between inde.pdf
What is the measure of the strength of the relationship between inde.pdfWhat is the measure of the strength of the relationship between inde.pdf
What is the measure of the strength of the relationship between inde.pdf
 
Some of the SO32- is oxidized by atmospheric oxygen in air into SO42.pdf
Some of the SO32- is oxidized by atmospheric oxygen in air into SO42.pdfSome of the SO32- is oxidized by atmospheric oxygen in air into SO42.pdf
Some of the SO32- is oxidized by atmospheric oxygen in air into SO42.pdf
 
Should begin with a letter and may contain additional letters and di.pdf
Should begin with a letter and may contain additional letters and di.pdfShould begin with a letter and may contain additional letters and di.pdf
Should begin with a letter and may contain additional letters and di.pdf
 
#include iostream #include string #include iomanip #incl.pdf
#include iostream #include string #include iomanip #incl.pdf#include iostream #include string #include iomanip #incl.pdf
#include iostream #include string #include iomanip #incl.pdf
 

Recently uploaded

Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 

Recently uploaded (20)

Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 

a)A.javapublic class A {   public static void main(String[] ar.pdf

  • 1. a) A.java public class A { public static void main(String[] args) { for (int i = 0; i <= 8; i++) { for (int j = 0; j < i; j++) { System.out.print(" # "); } System.out.println(" "); } } } __________________________________________________ Output: # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ____________________________________________________ b) B.java public class B { public static void main(String[] args) { for (int i = 8; i >= 1; i--) { for (int j = 0; j < i; j++) { System.out.print(" # ");
  • 2. } System.out.println(" "); } } } ______________________________________________ Output: # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ____________________________________________________ C) C.java public class C { public static void main(String[] args) { for (int i = 0; i < 8; i++) { for (int j = 1; j <= 8; j++) { if (i < j) System.out.print("# "); else System.out.print(" "); } System.out.println(); } } } ________________________________________________ Output: # # # # # # # #
  • 3. # # # # # # # # # # # # # # # # # # # # # # # # # # # # ___________________________________________________ d) D.java public class D { public static void main(String[] args) { for (int i = 8; i >= 0; i--) { for (int j = 0; j < 8; j++) { if (i > j) System.out.print(" "); else System.out.print(" #"); } System.out.println(" "); } } } ___________________________________ Output: # # # # # # # # # # # # # # # # # # # # # # # # # # # #
  • 4. # # # # # # # # _____________________________________________ e) E.java public class E { public static void main(String[] args) { int n = 7; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { if ( (i==0) || (j==0) || (i == n - 1) || (j == n - 1) ) { System.out.print(" #"); } else { System.out.print(" "); } } System.out.println(); } } } _______________________________________ Output: # # # # # # # # # # # # # # # # # # # # # # # # _____________________________________ f) package org.students; public class F {
  • 5. public static void main(String[] args) { int n = 7; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { if ( (i==j) || (i==0) || (i == n - 1)) { System.out.print(" # "); } else { System.out.print(" "); } } System.out.println(); } } } _______________________________________________ Output: # # # # # # # # # # # # # # # # # # # _____________________________________________ g) G.java public class G { public static void main(String[] args) { int n = 7; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++)
  • 6. { if ( (i==0) || (i == n - 1) || (i + j == n - 1) ) { System.out.print(" # "); } else { System.out.print(" "); } } System.out.println(); } } } _______________________________________ Output: # # # # # # # # # # # # # # # # # # # _____________________________________________ h) H.java public class H { public static void main(String[] args) { int n = 7; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { if((i == 0) || (i == j) || (i + j == n - 1) || (i == n - 1)) { System.out.print(" # "); }
  • 7. else { System.out.print(" "); } } System.out.println(); } } } _____________________________________________ Output: # # # # # # # # # # # # # # # # # # # # # # # ___________________________________________ I) I.java public class I { public static void main(String[] args) { int n = 7; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { if((i == 0) || (j == 0) || (i == n - 1) || (j == n - 1)|| (i == j) || (i + j == n - 1)) { System.out.print(" # "); } else { System.out.print(" "); }
  • 8. } System.out.println(); } } } ____________________________________________ Output: # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ___________________________________________________ Solution a) A.java public class A { public static void main(String[] args) { for (int i = 0; i <= 8; i++) { for (int j = 0; j < i; j++) { System.out.print(" # "); } System.out.println(" "); } } } __________________________________________________ Output: #
  • 9. # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ____________________________________________________ b) B.java public class B { public static void main(String[] args) { for (int i = 8; i >= 1; i--) { for (int j = 0; j < i; j++) { System.out.print(" # "); } System.out.println(" "); } } } ______________________________________________ Output: # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ____________________________________________________ C) C.java public class C {
  • 10. public static void main(String[] args) { for (int i = 0; i < 8; i++) { for (int j = 1; j <= 8; j++) { if (i < j) System.out.print("# "); else System.out.print(" "); } System.out.println(); } } } ________________________________________________ Output: # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ___________________________________________________ d) D.java public class D { public static void main(String[] args) { for (int i = 8; i >= 0; i--) { for (int j = 0; j < 8; j++) { if (i > j) System.out.print(" ");
  • 11. else System.out.print(" #"); } System.out.println(" "); } } } ___________________________________ Output: # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # _____________________________________________ e) E.java public class E { public static void main(String[] args) { int n = 7; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { if ( (i==0) || (j==0) || (i == n - 1) || (j == n - 1) ) { System.out.print(" #"); } else { System.out.print(" "); }
  • 12. } System.out.println(); } } } _______________________________________ Output: # # # # # # # # # # # # # # # # # # # # # # # # _____________________________________ f) package org.students; public class F { public static void main(String[] args) { int n = 7; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { if ( (i==j) || (i==0) || (i == n - 1)) { System.out.print(" # "); } else { System.out.print(" "); } } System.out.println(); } } } _______________________________________________
  • 13. Output: # # # # # # # # # # # # # # # # # # # _____________________________________________ g) G.java public class G { public static void main(String[] args) { int n = 7; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { if ( (i==0) || (i == n - 1) || (i + j == n - 1) ) { System.out.print(" # "); } else { System.out.print(" "); } } System.out.println(); } } } _______________________________________ Output: # # # # # # # # # #
  • 14. # # # # # # # # # _____________________________________________ h) H.java public class H { public static void main(String[] args) { int n = 7; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { if((i == 0) || (i == j) || (i + j == n - 1) || (i == n - 1)) { System.out.print(" # "); } else { System.out.print(" "); } } System.out.println(); } } } _____________________________________________ Output: # # # # # # # # # # # # # # # # # # # # # # # ___________________________________________
  • 15. I) I.java public class I { public static void main(String[] args) { int n = 7; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { if((i == 0) || (j == 0) || (i == n - 1) || (j == n - 1)|| (i == j) || (i + j == n - 1)) { System.out.print(" # "); } else { System.out.print(" "); } } System.out.println(); } } } ____________________________________________ Output: # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ___________________________________________________