Professional Documents
Culture Documents
COMMERCE STREAM
ACCOUNTANCY
A. Journalise the following transactions and post them into ledger accounts. And
also prepare trial balance.
1. Amount received from Mohan Rs.980
Discount allowed Rs. 20
2. Commenced business with cash Rs.50,000
3. Goods purchased on credit from Mohan Rs. 10,000
4. Received interest Rs. 1,000
5. Purchased machinery for cash Rs. 5,000
6. Rent paid Rs. 500
7. Depreciation on Machinery Rs. 3,000
8. Paid cash for stationery Rs.4,500
9. Rent due to landlord Rs. 520
10. Took goods for personal use Rs. 200
11. Deposited into bank Rs. 1,500
12. Paid installation charges of Machinery Rs. 100
13. Purchased Timber from Naveen of the list price of Rs. 2,000. He allowed 10% trade
discount.
14. Furniture costing Rs.500 was used in furnishing the office.
15. Sold furniture to Naresh of the list price of Rs.1,000 and allowed him 5%trade
discount
16. Paid wages Rs. 2,000
17. Received Rs. 975 from Harikrishnan in full settlement of his account for Rs. 1,000.
18. Received a first and final dividend of 60 paise in a Rs. From the official receiver of
Mr. Rajan, who owed us RS. 1,000.
19. Goods given to proprietor’s daughter Rs.300.
20. Goods worth Rs. 1,000 distributed by fire
21. Goods worth Rs. 2,000 distributed as sample
22. Received cash from Rita against bad debt written off last year, RS. 3,300.
23. Received interest on loan Rs. 250 from Mohan, debtor.
24. Ramesh is declared insolvent received from his official receiver a first and final
dividend of 55p in a Rs. On a debt of Rs.2, 500.
25. Received interest on loan from the debtor Rs.1,100.
26. Received Rs. 765 from Narindra in full settlement of a debt to his account for Rs.
800
27. Received Rs. 9,975 from Sarika in full settlement of her account for Rs. 10,000.
28. Received a first and final dividend of 70 paise in a rupee from the official receiver of
Mr. Karim who owed us Rs. 10,000.
29. Received cash for a bad debt written off last year Rs. 100
30. Stock at the end of the year Rs. 5,000.
31. Opened a current account Rs .12,000
BUSINESS STUDIES
4. ABC Ltd. is planting trees on the roadside. What objective is it trying to achieve
5. Name the occupation in which people work for others and get remunerated in
return.
8. Which one of the broad categories of industries covers oil refinery and sugar
mills ?
9. “Profit is not an objective but a requirement of business.” Do you agree with the
statement ? Support your answers with reasons .
10. “Business is an institution organized to provide goods and services under the
incentive of private gain.” Discuss.
11. “Commerce comprises of trade and all the services that make trade possible.”
Discuss.
12. Alka, Komal and Kamal are partners in a firm. Kamal uses Rs. 20 Lac of the
firm, without any information to the other partners, to purchase a house ad he
earns a profit of 5 lack on it. Which are being violated here? Also tell, what will
happen to the profit earned by Kamal?
13. Which form of business organization give all right to a Minor Member?
14. From the point of view of Sole Trade appears successful, but certain other
issues makes it seem unsuccessful. Evaluate this statement.
15. Explain different stages in the formation of a company?
UNIT 3: PUBLIC,PRIVATE AND GLOBAL ENTERPRISES
16. One of your friends has set up an enterprise in private sector, his objective is to
earn the maximum profit. Your friend says that he will achieve his objective at
any rate, even if he has to do any immoral activity. Point out the social values
likely to be affected by your friend’s approach?
17. Write the names of any 8 Indian MNCs.
18. The Government of India wants to expand the Railways. Answer the following
questions related to it.
i. Which Government department will do this?
ii. To which department does this class of enterprise belong?
iii. How will the finance of this enterprise be managed?
iv. Who is responsible for the work performance of this department?
UNIT 4: EMERGING MODES OF BUSINESS
19. The owner of Bharat Saree Cenre, Mr. Chaturvedi, applied for a loan to the
bank. Along with the application, he enclosed the balance sheet of the previous
five years. The balance shee contained several wrong pieces of information. The
bank accepted the information given in the balance sheet as right and approved
of the loan application. Which values have been violated by the firm here in the
loan application?
20. Which social values are there that are provided by Life Insurance, write about
any three of them.
21. Shreya is a very busy home maker. She has to attend to several activities from
time to time, viz withdrawing money from the bank, depositing money in the
bank, getting information about the bank balance, getting the mobile recharged,
making payments of the bills for electricity, water, telephone etc. She wants that
all these jobs should be completed under one roof. Do you have any suggestions
to be made to Shreya? If yes, what suggestion?
ECONOMICS
Prepare seminar and power point presentation for the following topics:
PHYSICAL EDUCATION
MATHEMATICS
ENGLISH CORE
Do the following Practice Questions in your Note Book , based on the already forwarded formats
and samples of all writing sections.
Literature part, some Important Questions are also attached along with it; learn all the Questions
and Answers and prepare well for your upcoming exams
1. NOTE MAKING
I. Excessive use of plastic bags and their unregulated disposal has been choking lakes,
ponds and urban sewage systems, the Supreme Court said on Monday while warning that it
posed a threat more serious than the atom bomb for the next generation.
This observation from a bench of Justices GS Singhvi and S J Mukhopadhaya came on a PIL
filed by two Andhra Pradesh-based NGOs drawing the court's attention to 30-60 kg of plastic
bags recovered from the stomachs of cows because of irresponsible disposal of plastic bags and
defunct municipal waste collection system.
The court issued notice to the Centre and state governments on the PIL seeking ban on use of
plastic bags in municipal areas which did not have a prompt garbage collection, segregation and
disposal system. The NGOs said absence of a proper system allowed cows to rummage through
garbage bins and eat foodstuff disposed of in plastic bags, which get stuck in their stomach.
"Apart from the plastic choking the digestive system of the plastic residues enter the human food
chain through dairy and animal products," he added.
But the bench wanted to address the larger questions arising from indiscriminate use of plastic
bags, which not only posed a grave threat to nature and environment but also to the human race
itself. It suggested that the petitioner make the manufacturers and a television channel, which has
been running a campaign against use of plastic, parties to the PIL for a wider scrutiny of the
important issue.
“We want to expand the scope of this petition. Unless we examine a total ban on plastic bags or
put in place a system for manufactuers mandating them to collect back all plastic bags, the next
generation will be threatened with something more serious than the atom bomb,” the bench said.
The court also drew the petitioner’s attention to large quantities of water packed in plastic
pouches, which were thrown around in undisciplined manner across the country every day, “A
rough estimate shows more than 100 million water pouches are thrownaway,” the bench said.
A. On the basis of your reading of the above passage, make notes in points only , using
abbreviations wherever necessary . Supply a suitable title (5)
B. Write a summary of the passage in about 80 words.Give suitable title. (3)
II. The Trail of smoke in most cases inevitably leads to school. And college days-those
adolescent times when mere lighting up gave them the thrill of indulging in the
prohibited. And yes, they weren‘t mama’s boy (or girls) anymore; they were macho and
grown up beyond listening to nannies. Or so they thought, till they got addicted.
There is a clear link between the youth and tobacco addiction. Statistics reveal that many
children are initiated into the habit of smoking at the tender age of 10 years, according to
Dr. Srinath Reddy, a researcher-activist. That’s why it makes sense to stop them young,
when they are vulnerable to peer pressure. Smoking, which often starts as an experiment
in the company of friends often transforms into addiction.
According to the Non-Smoker’s Health Protection Act 1997 nobody is allowed to store,
sell or distribute cigarettes, beedies or any other tobacco product within an area of 100 m
around colleges, schools and other educational institutions. The Indian Parliament passed
another comprehensive legislation, the Cigarette and Other Tobacco Products Act, a few
years ago banning the sale of tobacco products to minors.
Has that made any difference? “You have to go to north campus to see if any law is
followed.’ Many students even argue that it is a matter of personal choice. “Once in
college, a student is old enough to take decisions. It is clearly mentioned on cigarette
packs that ‘smoking is injurious to health’ and after that if someone smokes, it is
completely the individual’s choice,” says Manu Singh, a student at JNU. Sad reality is
that nothing has been able to stop students from smoking in schools and colleges. It’s
fashion.
The law enforcement agencies takes refuge behind pleas like they have largeareas to
cover with a small term. Their strength, they say, is not adequate to enforce laws.
“Sometimes people pay the fine (Rs 200), which is hardly a big amount. It universities
and colleges, raids are not possible. With just one person from the police, it becomes
impossible to control them,” said Dr. M.D. Thapa, Chief District Medical Officer,
Northwest district.
Advocate Ashok Agarwal does not buy the argument According to him, there is a clear
lack of interest on the part of the lawmakers. “The police and the administration have
their own priorities hence they have little time to look into these sensitive issues. The
situation in this case is that of accepted and agreed violation where just nobody is
bothered.” he says.
The one answer the experts agree on is; the government. “There is no effort to implement
the laws,” complains advocate Ashok Agarwal. When society does not care, the
government becomes duty-bound to make them care. “There is a direct link between the
youth and tobacco addiction. They are the key targets for the MNCs,” says Bijon Mishra,
a social activist involved with the NGO, Voice. While society and its institution ignore
those mischievous puffs in school canteens, the biggest beneficiaries are the tobacco
companies.
a) On the basis of your reading of the above passage, make notes in points only , using
abbreviations wherever necessary . Supply a suitable title (5)
b) Write a summary of the passage in about 80 words.Give suitable title. (3)
2. You are Abhinav/Alka. You have planned a 2-week course to be arranged to help the
children of your housing society called “Renaissance Housing Society” at chandigarh
acquire Spoken English Skills. As the Secretary of the Society , prepare a notice for the
Society’s notice board stating the objective of the course ,giving necessary details of the
course and requesting the children of the society to join the course.
ADVERTISEMENT
1. You are Mohan of Raja ki Mandi, agra. You want a dance teacher for your younger
sister. Write an advertisement to be published in the classified columns of a local daily.
2. You are Harish of No. 10 , Kailash Ganj and Lucknow. Draft an advertisement to be published in
the daily. ‘The Hindustan Times’ , under classified columns to dispose off your car as you are
going abroad.
POSTER
You are Rajeev Nanda, Secretary Welfare Association, Faridabad City , Design a suitable
poster highlighting the EVILS OF DOWRY.
.
LETTERS
1. You are Suresh/Smita. You come across the following advertisement in a national daily.
You consider yourself suitable and eligible for the post. Write an application in response
to the advertisement.
SITUATION VACANT
Applications are invited for the post of a Nursery Teacher in a reputed school of
Delhi. The candidate must have at least 5 years experience of teaching tiny-tots. The
applicant must have a pleasant personality. She/he should be creative and innovative,
attractive salary. Interested candidates should apply to the Principal AKS
International, Indirapuram, New Delhi within 10 days with detailed resume.
2. Write a letter to the Editor, The Times of India, New Delhi, about the frequent traffic
jams in Guragon, especially during the rains, stating the problems faced by the people
and also suggesting ways to cope with it. You are Prayas/Preeti 12, Shradhanand Colony,
Gurgaon.
3. Write a letter to the Manager, Bata Shoe Company, Faridabad complaining about the
quality of shoes bought by you from their local showroom. Mention the cash memo and
design number.
4. Mr. Satish Kaul is the Sports Instructor in Geeta Convent, Narasapur. The Principal of
the school asks Mr. Kaul to place an order for buying cricket kits, volley ball nets,
footballs, badminton and the necessary sport accessories required. Mr. Kaul decides to
place an order with Messrs Lohia Sports Equipment, Narasapur. Write the order letter
GRAMMAR
1. The following passages have not been edited. There is one error in each line. Identify
the error in each line. Underline the error and write the correct word against it.
1. Yoga has an ancient art.
It had become popular now . a)_____________
Yoga in Sanskrit mean union. b) _____________
The union be of the mind, c) _____________
body and soul. Yoga is the good way d) _____________
to lead a healthy life. It helped one e) _____________
to be flexible and fit. People at f) _____________
different age groups could practise yoga. g) _____________
It helps one looks young than h) _____________
one's age. It is the cheap way to cure all i) _____________
diseases. It rejuvenate the mind and j) _____________
give one a reason to live. Yoga k) _____________
had also become a passion in the west.
2.In the unedited passage given below, one word has been omited in
each line. Write the missing word along with the word that comes before
and the word that comes after.
In Kapilvastu a baby boy born to king (a) ________
Sudedhana and Queen Mahamaya. The boy (b) ________
named Siddhartha. But he often called (c) ________
his class name of Gautama too. He grew (d) ________
to be a scholarly and thoughtful youngman. (e) ________
He had learnt all the skill of a (f) ________
warrior he did not. Like to use them. (g) ________
He never participated the royal hunts. (h) ________
Read the novel “The Canterville Ghost”. Write its detailed critical review covering aspects like
characterization, plot, summary etc.
*********************************************************
ENGLISH LITERATURE
(QUESTION BANK)
HORNBILL – PROSE
THE PORTRAIT OF A LADY
Short answer questions:
1. Why was it hard for the author to believe that his grandmother was once young and pretty?
2. The grandmother had a divine beauty. How does the author bring this out?
3. ‘That was the turning point in our friendship.’ What was the turning point?
4. Draw a comparison between village school education and city school education.
5. What did the author think was the last physical contact with his grandmother? Was it really so?
Long answer questions:
1. What was Khushwant Singh’s grandmother think of education in the city school?
2. How did Khushwant Singh’s grandmother bid him farewell when he was leaving for his studies
abroad?
3. How did the grandmother celebrate Khushwant Singh’s return form abroad?
4. What did the grandmother think of education in the city school?
5. Everybody including the sparrows mourned grandmother’s death. Elaborate.
WE’RE NOT AFRAID TO DIE…
Short answer questions:
1. Whom did the narrator and his family want to duplicate and why?
2. Describe Wavewalker.
3. How did they celebrate Christmas and the New Year’s Day?
4. What precautions did the captain take to save the boat?
5. What was the tremendous explosion that took place on January 2? How did the narrator survive this
situation?
6. Who were Larry and Herb?
7. Describe the injuries suffered by the narrator and Sue.
8. Why did Mary and the narrator feel that the end was near?
9. What did Jon say to his father about dying?
10. Why did the search for the island begin?
Long answer questions:
1. Describe the first leg of the journey and the preparations made by the narrator to undertake the
voyage.
2. What urgent steps were taken by the Captain and the crew to save Wavewalker?
3. Describe the difficulties that Wavewalker had to face from January 2 to January 7?
POETRY
A PHOTOGRAPH
Answer the following questions in about 30 – 40 words.
1. What does the word ‘Cardboard’ denote in the poem ‘A Photograph’?
2. What does the picture taken by the Uncle Show?
3. What does the phrase “transient feet” suggest?
4. What are the feelings of the poetess when she sees her mother’s
photograph?
5. How has the poetess expressed her sense of loss?
6. Explain ‘Its silence silences’.
HOLIDAY HOMEWORK
1). Manager of Bachat Bank has developed a java form for finding EMI to be paid by
customers against repayment of loan.
(ii) If loan amount is less than or equal to 0. It should display an error message
“Invalid Amount” and cursor should point to jtxtLoanAmt.
(iii) When the user clicks the CmdCalcEMI button, the total payable EMI should be
calculated and displayed in the jtxtEMI text box. To calculate EMI, firstly calculate
compound interest using formula ci=p*(1+r/100)^t. Add compound interest and
processing charge to loan amount and divide by time (in months).
(iv) Write code for jCmdExt button to stop the application and jCmdClear command
button to clear all the text boxes, option buttons. Also cursor should point on
jtxtLoanAmt test box.
2.
Write sample code for calculate button to display rate of interest as per rate given
in the table and calculate maturity amount.
(MaturityAmt = amount+amount*duration*rate_of_Interest*12 )
ICICI 8.5%
HDFC 8%
Q3. (a). Read the following case study and answer the questions that follows: 1
The Shop n Store has developed the following data entry screen for its operations.
The store offers three different types of membership discount schemes for its regular
customers. Platinum members get a discount of 10% on all their purchases, Gold
members get 5% and Silver members get 3% discount.
(i).Write the code to disable the text fields AmountTF, DiscountTF and NetTF.
(ii).Write the code for CalcBTN to calculate the amount, discount and net amount as
per given descriptions and conditions.If the bill amount is more than 5000 the
customer will get an additional discount of 2%.
(iii).Write the code for ExitBTN to close the application.But before closing the
application it should check if the net amount > 10,000 then membership of the
customer should be upgraded and displayed. For example, if the customer already
has Silver membership it should be upgraded Gold membership (similarly from gold
to platinum) and he informed of the same using a message box.
Q4.Regal Theater has computerized its ticketing system. The programmer has
developed a GUI application in Netbeans as shown below:
At ticket counter, three types of tickets(Box, balcony and General) at the rate of
200, 150 and 100 respectively are available. If the movie is tax free , then the total
amount should be deducted by Rs. 25 per ticket.
.
Write code to do the followings :
1. Calculate and display the Total amount in the corresponding text field when
calculate button is pressed.
2. Clear all the text fields.
3. Close the application when Exit button is clicked.
SET 3
Q1. Read the following case study and answer the following questions:
HDFC 12%
VISA 9.5%
ICICI 10%
AXIS 10.5%
SBI 8%
(a) Write the command for Discount button to compute discount amount and net
amount.
(b) Write the code for Clear command button to clear all the text boxes and set the
default choice in the radio button as SBI.
(c) Write the code for Exit command button.
SET 4
Q1. Prachaar Store is a Magazine distributor for Bharat Today. It is offering heavy
discounts on the subscription of Bharat Today. The distributor plans to computerize
its billing system. A programmer is required to make the following GUI interface to
calculate the Discount Amount & Bill Amount to be paid by the
subscriber as shown below:
The annual subscription of Bharat Today for one year is Rs.1400/- without any
discount.
(i) Ensure at design time that the textfields for Total Amount (txtTot) Discount
Amount(txtDisc) and Net Amount(txtNet) are uneditable and btnCalNet is not
active
(ii) When “Calculate Total & Discount” button(btnCalTotDisc) is clicked, calculate and
display the Total amount and discount in their corresponding textfields(txtTot &
txtDisc)
(iii) When “Calculate Net” button (btnCalNet) is clicked display the Net amount in the
textField txtNet .
SET 5
Q1. Dream Land Enterprises has computerized its billing. The following data entry
screen
The criteria for calculation of delivery and handling charges is as given below-
Q1. Ms. Sheela works in a shopping mall. To calculate net payable amount she has developed
the following GUI in NetBeans. 10
The shop accepts payments in three modes- Cash, Debit Card, Credit Cards.
Cash 12%
Credit Card 8%
If the Member check box is checked then the customer gets an additional
2. When Calculate button is clicked the discount and net payable amount is calculated as
per the given criteria and displayed in discount and net payable text boxes.
3. When Clear button is clicked all the text boxes should be clear.
4. Close the application when Exit button is pressed.
SET 7
Q1. Read the following case study carefully and answer the questions that follows :
A School decided to computerized its result making work. The Interface of the
application is given below. The maximum marks for First term and Second term is 150
and for Half Yearly 300 and for Annual is 400. The maximum total marks is 1000. A
weightage of 2 % should be given if a student is either a NCC cadet or a sports
person. 10
Marks>85 A+ > 75 A+
70-85 A 60 to 75 A
50-70 B 50 to 60 B
<50 C <50 C
Initially the textfields totalTF, perTF, gradeTF and button gradeBTN should be
disabled .
(i) On Clicking perBTN button , the total marks and Percentage should be
calculated and displayed in respective textfield.
(ii) On Clicking gradeBTN button. The grade should be checked and displayed
in textfield.
(iii) On clicking of clearBTN command button , all textfields and checkboxes
should be cleared and radion button for science should be set to default.
(iv) On clicking of exitBTN button, the application should be closed.
1)While working in Netbeans, Ms. Lakshmi wants to display "Pass "or "Needs to Reappear" message
depending the marks entered in jTextField. Help her to choose more appropriate statements out of "if
statement" and "switch statement".
2) Given the following code fragment :
if(a==0)
System.out.println(“zero”);
else if(a==1)
System.out.println(“one”);
else if(a==2)
System.out.println(“two”);
else if(a==3)
System.out.println(“three”);
Write an alternative code (Using switch) that saves on number of comparisons.
3). Rewrite the following program code using a switch statement :
if ( code = = 1 )
Month = "January" ;
else if ( code = = 4 )
Month = "April" ;
else if ( code = = 8 )
Month = "August" ;
else
Month = "No Match" ;
4) Rewrite the following code using if..else if without effecting the output of the code:
switch(per)
{
case 90 : System.out.println(“A1”);
break;
case 80 : System.out.println(“A2”);
break;
case 70 : System.out.println(“B1”);
break;
case 60 : System.out.println(“B2”);
break;
case 50 : System.out.println(“C1”);
break;
default: System.out.println(“D1”);
}
5) Write the equivalent switch case for the following code :
If (num1 = =1 )
jTextField1.setText(“Number is one”);
else If (num1 = =2 )
jTextField1.setText(“Number is two”);
else If (num1 = =3 )
jTextField1.setText(“Number is three”);
else
jTextField1.setText(“Number is more than three”);
6) Rewrite the following if-else segment using switch-case statement
char ch='A';
if(ch=='A')
System.out.println("Account");
if((ch=='C') || (ch=='G'))
System.out.println("Admin");
if(ch=='F')
System.out.println("Advisor");
7) Write the equivalent switch case for the following code :
if (num1 = =1 )
jTextField1.setText(“Number is one”);
else If (num1 = =2 )
jTextField1.setText(“Number is two”);
else If (num1 = =3 )
jTextField1.setText(“Number is three”);
else
jTextField1.setText(“Number is more than three”);
int i,j=5;
i==j+5;
if(i=j)
{
jtextfield1.setText(“I and j are unequal”);
breaks;
}
else
jtextfield1.setText(“I and j are not equal”)
20) The following code has some error(s). Rewrite the correct code underlining all the corrections made.
int y=3;
switch(y);
{
case 1: System.out.print(“Yes its One”);
case >2: System.out.println(“Yes its more than Two”);
break;
case else: System.out.print(“Invalid Number):
21) Rewrite the code using switch statement:
If(k==1)
Day=”Monday”;
else if(k==2)
Day=” Tuesday”;
else if(k==3)
Day=” Wednesday”;
else
Day=”-”;
22). what will be the value of j and k after execution of the following code:
int j=10,k=12;
if(k>=j)
{
k=j;
j=k;
}
23) Find the output of the following code:
int First = 7;
int Second = 73;
First++;
if (First+Second> 90)
jlabel1.setText("value is 90 ");
else
jlabel1.setText("value is not 90 ");
24) Find the output
int Number1 = 7,Number2=8;
int Second = 73;
if (Number1>0 || Number2>5)
if (Number1>7)
jTextField1.setText("Code Worked");
else
jTextField1.setText("Code MightWork");
else
jTextField1.setText("Code will not Work");
25) Predict the output for tan & tan1 if sac equals 7?
int tan = 0, tan1 = 4 ;
if ( sac == 2 )
{ tan = 4 ; tan1 = 0;
}
else if (sac == 8)
{
tan = 0 ; tan1 = 4;
}
JOptionPane.showMessageDialog( null , “ tan = “ + tan +” , tan1 = “ + tan1 ) ;
26) What will be the output produced by following code fragment? (1)
float x=9;
float y=5;
int z=(int)(x/y);
switch(z)
{
case1:x=x+2;
case2: x=x+3;
default:x =x+1;
}
System.out.println(“value of x:”+x);
27) What will be the content of jtext field after executing the following code:
int n=6;
n=n+1;
if(n>5)
Jtextfield1.setText(Integer.toString(n));
else
jtextfield1.setText(Integer.toString(n+5));
28) Find out the value of variable a.
(i) x=0; y=14; (ii) if(6 > 7 || 8 > 7)
if( y > 8) a=10;
a = 2; else
else a=20;
a = 6;
While Loop
int i=Integer.parseInt(txt1.getText());
long fact=1;
int a=1;
while(a<=i)
{fact=fact *a;
a++;}
l1.setText(""+fact);
2. Fibonacci series:
int n=Integer.parseInt(txt1.getText());
int f1=0,f2=1,f3,i;
System.out.println(f1);
System.out.println(f2);
for(i=1;i<=n;i++)
{
f3=f1+f2;
System.out.println(f3);
f1=f2;
f2=f3;
}
3. Reverse of a number:
int number=Integer.parseInt(txt1.getText());
int reverse=0,remainder,i;
while(number>0)
{
remainder=number%10;
reverse=reverse*10+remainder;
number=number/10;
}
System.out.println(reverse);
int number=Integer.parseInt(txt1.getText());
int temp=number;
int reverse=0,remainder,i;
while(number>0)
{
remainder=number%10;
reverse=reverse*10+remainder;
number=number/10;
}
System.out.println(reverse);
if(reverse==temp)
l1.setText("palindrome");
else
l1.setText("not palindrome");
if(sum==temp)
l1.setText("Armstrong");
else
l1.setText("Not Armstrong");
7. Prime number:
int number=Integer.parseInt(txt1.getText());
int flag=0,i;
for(i=2;i<number;i++)
{
if(number%i==0)
{
flag=1;
break;
}
}
if(flag==0)
l1.setText("Prime");
else
l1.setText("Not Prime");
Pattern Printing:
1. Code:
int i,j;
for(i=1;i<=4;i++)
{ for(j=1;j<=i;j++)
{ System.out.print(j);
}
System.out.println();
}
OutPut
1
12
123
1234
2. Code
int i,j;
for(i=1;i<=4;i++)
{ for(j=1;j<=i;j++)
{ System.out.print(i);
}
System.out.println(); }
Output
1
22
333
4444
3. int i,j;
char ch=65;
for(i=1;i<=4;i++,ch++)
{
for(j=1;j<=i;j++)
{ System.out.print(ch);
}
System.out.println();
}
A
B B
C C C
D D D D
4. int i,j;
char ch=65;
for(i=1;i<=4;i++)
{ for(j=1;j<=i;j++,ch++)
{ System.out.print(ch);
}
System.out.println();
}
A
B C
D E F
G H I J
5. Code
int i,j;
char ch=65;
for(i=4;i>=1;i--,ch++)
{ for(j=1;j<=i;j++)
{ System.out.print(ch);
}
System.out.println();
}
AAAA
BBB
CC
D