If any add appear like this please click skip add
Category
INFO
Showing posts with label LECTURE NOTES. Show all posts
Showing posts with label LECTURE NOTES. Show all posts
Sunday, October 14, 2012
Tuesday, October 2, 2012
CS 2204 ANALOG AND DIGITAL COMMUNICATION/Principle
1:19 AM
ANALOG AND DIGITAL COMMUNICATION, Anna University Chennai Question Bank, anna university question bank for CSE, CSE, CSE THIRD, IT, IT THIRD, LECTURE NOTES, QUESTION BANKS
1 comment
CS 2204 ANALOG AND DIGITAL COMMUNICATION /Principle
Third Semester Question banks two marks and 16 marks
CSE THIRD, anna university question bank for CSE, CSE,IT THIRD, IT,ANALOG AND DIGITAL COMMUNICATION , Anna University Chennai Question Bank, QUESTION BANKS, CSE THIRD, anna university question bank for CSE, CSE,IT THIRD, IT,ANALOG AND DIGITAL COMMUNICATION , Anna University Chennai Question Bank, QUESTION BANKS, CSE THIRD, anna university question bank for CSE, CSE,IT THIRD, IT,ANALOG AND DIGITAL COMMUNICATION , Anna University Chennai Question Bank, QUESTION BANKS, CSE THIRD, anna university question bank for CSE, CSE,IT THIRD, IT,ANALOG AND DIGITAL COMMUNICATION , Anna University Chennai Question Bank, QUESTION BANKS,
click here to download
![]() | 2010 CS2204 subject notes.doc 3306K View Download |
![]() | 141304 ADC.doc 2289K View Download |
![]() | Analog and Digital Communicaitons PPT.ppt 455K View Download |
![]() | ADC EC.pdf 152K View Download |
Contacts our team for more question papers
UPLOADED BY www.keerthiworld.tk
Credit To :
Author Dr. Ganesan N Ph.D
Monday, October 1, 2012
New ECE Third Semester Question Banks with solutions updated
6:41 AM
ANNA UNIVERSITY QUESTION BANKS FOR ECE, ECE, ECE THIRD, LECTURE NOTES, QUESTION BANKS
No comments
Anna University
Department of Electronic and Communication Engineering
EC 2201 — ELECTRICAL ENGINEERING. ... PART A — (10 × 2 = 20marks)
Semester : 3
Year : 2
Department : B.E ECE
EC 2201 Electrical Engineering Question Bank by A.R Engineering College - 1st Edition.
EC2201 Electrical Engineering - Question Bank
ECE Electrical Engineering Two Marks Question & Answers
EC 2201-ELECTRICAL ENGINEERING QUESTION BANK
Sample questions
Uploaded By Alexander
Search Results
Saturday, September 29, 2012
ENGINEERING ECONOMICS AND FINANCIAL ACCOUNTING Lecture Notes free download
5:52 AM
anna university question bank for CSE, CSE SEVENTH, ENGINEERING ECONOMICS AND FINANCIAL ACCOUNTING, IT, IT FIFTH SEM, LECTURE NOTES, QUESTION BANKS
No comments
MG2452 ENGINEERING
ECONOMICS AND
FINANCIAL
ACCOUNTING Lecture Notes for IT - Fifth (5th)
semester
MG2452 Lecture Notes two marks and 16 marks free download
Syllabus :
UNIT I INTRODUCTION
Managerial Economics - Relationship with other disciplines - Firms: Types, objectives
and goals - Managerial decisions - Decision analysis.
UNIT II DEMAND & SUPPLY ANALYSIS
Demand - Types of demand - Determinants of demand - Demand function - Demand
elasticity - Demand forecasting - Supply - Determinants of supply - Supply function -
Supply elasticity.
UNIT III PRODUCTION AND COST ANALYSIS
Production function - Returns to scale - Production optimization - Least cost input -
Isoquants - Managerial uses of production function.
Cost Concepts - Cost function - Determinants of cost - Short run and Long run cost
curves - Cost Output Decision - Estimation of Cost.
UNIT IV PRICING
Determinants of Price - Pricing under different objectives and different market structures
- Price discrimination - Pricing methods in practice.
UNIT V FINANCIAL ACCOUNTING (ELEMENTARY TREATMENT)
Balance sheet and related concepts - Profit & Loss Statement and related concepts - -
Financial Ratio Analysis - Cash flow analysis - Funds flow analysis - Comparative
financial statements - Analysis & Interpretation of financial statements.
UNIT VI CAPITAL BUDGETING. (ELEMENTARY TREATMENT)
Investments - Risks and return evaluation of investment decision - Average rate of return
- Payback Period - Net Present Value - Internal rate of return.
UNIT –I
ECONOMICS
Economics is the study of how societies use scarce resources to produce valuable commodities and
distribute them among different people.
SCOPE OF ECONOMICS
1. Consumption: Satisfaction of human wants is called consumption which forms one of the
important branches of economics. This tells how people behave in consumption of goods and
services in order to maximize their satisfaction.
2. Production: Goods and services have to be produced with the help of factors of production. So,
production is another branch of economics. It concerned with how maximum goods are produced
with minimum cost or how the scarce factors could be utilized economically for better results.
3. Exchange: Goods and services cannot be produced at one place or at one point of time. Goods
produced by one are exchanged for the goods produced by the others. So, exchange forms another
branch of study in economics.
4. Distribution: Goods and services are produced with efforts, i.e., by combining the factors of
production. These efforts have to be paid for or rewarded. The land gets rent, the labor get wages,
the capital gets interest and the organizer gets profit. This branch of study is called distribution in
economics.
5. Public Finance: This branch of study in economics studies about the sources of revenue to the
government and the principles governing the expenditure for the benefit of the people. It also studies
about public debt and financial administration.
ECONOMICS IS A SCIENCE OR AN ART
Economics as a Science: A science is a systematized body of knowledge ascertainable by
observation experimentation. It is a body of generalizations, principles, theories or laws which traces
out a casual relationship between cause and effect.
Economics is a systematized body of knowledge in which economic facts are studied and analyzed in
a systematic manner. For instance, economics is divided into consumption, production, exchange,
distribution and public finance which have their laws are theories on whose basis these departments
are studied and analyzed in a systematic manner.
Hence economics is a science like any other science which has its own theories and laws which
establish a relation between cause and effect. Economics is also a science because its laws possess
universal validity such as the law of diminishing returns, the law of diminishing marginal utility the
law of demand, Gresham’s law, etc.
Again, economics is a science because of its self corrective nature. It goes on revising its conclusions
in the light of new facts based on observations. Economic theories or principles are being revised in
the fields of macro economics, monetary economics, international economics, public finance and
economic development.
Economics as an Art: Unlike natural science, there is no scope for experimentation in economics
because economics is related to man, his problems and activities. Economic phenomena are very
Tuesday, July 24, 2012
anna university fifth semester ece question banks updated download
9:04 AM
Anna University Chennai Question Bank, ANNA UNIVERSITY QUESTION BANKS FOR ECE, ECE FIFTH, LAB MANUALS, LECTURE NOTES, QUESTION BANKS
No comments
latest anna university fifth semester question banks with solution and prevevious year question papers(full collection) ebooks for ece fifth semester free download,syllabus,lecture notes,maths, Notes, 2&16marks Answers, Question Banks, Important Questions searchengine,ppt,doc.pdf,mini projects,pre final year projects downalod titles, lab manual
EC2301 DigitalCommunication (DC) Download below
notes 2
notes 3
notes 4
notes 5
EC2302 Digital SignalProcessing(DSP) Download below
EC2303 ComputerArchitecture and Organization(CA) Download below
Notes 1
Notes 2
Notes 3
Notes 4
Notes 5
EC2305 TransmissionLines and Wave guides Download below
Notes 1
Notes 2
Notes 3
Notes 4
Notes 5
GE2021 EnvironmentalScience and Engineering(EVS) Download below
Notes 1
Notes 2
Notes 3
Notes 4
Notes 5
EC2304 Microprocessorsand Microcontrollers Download below
Notes 1
Notes 2
Notes 3
Notes 4
Notes 5
ebook fifth semster download
This is the example text for title one.Title ebook fifth semster for ece download
This is the example text for title two.ece fifth semester ebooks and question banks full download
This is the example text for title three.
tags: press ctl + plus buttton to zoom
Anna University ECE 5th Semester Syllabus Download
Anna University Question Papers For ECE
ECE FIFTH SEMESTER | anna university question banks
Anna University Question Papers
B.E.ece- Fifth (5th) Semester Question Banks (huge collections)
ECE Fifth(5th) Semester Syllabus - Anna University Regulation 2008
2009 2010 2011 2012
ANNA UNIVERSITY BE ECE SYLLABUS REGULATION 2008
Wednesday, June 27, 2012
Simple Way to learn Java Programing in two Days
5:32 AM
ALL DEPT, CSE, EBOOKS, HOW TO, IT, LECTURE NOTES, OTHERS, PROGRAMS, QUESTION BANKS, SOURCE CODES, VIVA-QUESTIONS
1 comment
Simple Way to learn Java Programing in two Days
JAVA PROGRAMING SIMPLE STEPS TO DEVELOP APLLICATIONS ND CODING
DESIGNER OF PASCAL LANGUAGE NIKLAUS WIRTH ONCE SAID
What is a CLASS & OBJECT?
How do you differentiate these two ? Explain with examples.
A class is a template, blueprint, plan,design or protype from wichObjects can be derived
If you create an object from a class , it means you created an instance of a class.
A SMALL EXAMPLE IN MY VIEW.....
Suppose if you are planning to construct a house first step what you will do ? you will go for design or plan of it, Once plan is ready you will start actual construction. By keeping this plan with you, construct one more house ,like wise you can construct any number of houses. Now here this plan is a class ,and actual construction is object. this class doesn't occupy any memory only object occupies memory. From one class we can create ‘N’ number of objects.
Few points on Structured programming and Object oriented programming?
DESIGNER OF PASCAL LANGUAGE NIKLAUS WIRTH ONCE SAID
"ALGORITHMS+DATASTRUCTURES=PROGRAMS".
HERE ALGORITHM COMES FIRST AND DATA STRUCTURES COMES SECOND.THIS IS HOW PROGRAMMERS WERE THINKING AT THAT TIME .FIRST THEY DECIDED THE PROCEDURES FOR MANIPULATIONS OF DATA, THEN THEY DECIDED WHAT STRUCTURE TO IMPOSE ON DATA TO MAKE MANIPULATIONS EASIER.OOP REVERSES THE ORDER AND PUTS DATA FIRST, THEN LOOKS AT THE ALGORITHM THAT OPERATE ON THE DATA. FOR SMALL PROGRAMS PROCEDURES WORKS WELL, BUT OBJECTS ARE BETTER FOR LARGER PROGRAMS. DEBUGGING ALSO EASIER WITH OOP.
Goals of JAVA!
When Java was invented it has few goals in mind,
1. It should be simple
2. It should be Object-Oriented
3. It should be “robust and secure”
4. It should be “platform independent and portable”
5. It should execute with high performance
6. It should be “interpreted, threaded and Dynamic”
What is JAVA ?
JAVA IS A PROGRAMMING LANGUAGE.
AS A WHOLE JAVA IS A PLATFORM, WITH LARGE LIBRARY, CONTAINING LOTS OF REUSABLE CODE, AND AN EXECUTION ENVIRONMENT THAT PROVIDE SERVICES SUCH AS SECURITY, PORTABILITY ACROSS SYSTEMS AND AUTOMATIC GARBAGE COLLECTION.
JAVA IS A HIGH QUALITY ENVIRONMENT AND LIBRARY.
History of JAVA
Actually Java was originally designed for programming consumer devices, but it was first succeful ly used to with internet applets.In the year 1991, when a group of SUN engineers (which is now subsidiary of oracle corporation) led by James Gosling, Patrick Nauton, Mile Sheridon wanted to design a small computer language that could be used for consumer devices like, cable TV switch boxes, remote controller, Microwave oven. Because these devices do not have lot of memory the language had to be small and generate very tight code. Also, because different manufacturers may choose different CPUs, it was important that the language not be tied to as single architecture, the project was code-named “Green”.
Later it renamed as “OAK” after an oak tree that stood outside gosling’s office. Then it renamed as JAVA.
Versions history you can find in the wiki:-
When API was growing it because difficult for SUN to Maintain.
They divided it in to 3 parts
They divided it in to 3 parts
and now it is called
1.JSE 2.JEE 3.JME
What is Programming?
NOW A DAY COMPUTERS BECAME PART OF HUMAN LIFE .MANY PEOPLE USES IT FOR DIFFERENT PURPOSES LIKE PLAYING GAMES, BANKING TRANSACTIONS, AND FOR ONLINE PURCHASES. THESE COMPUTERS HAS NO INTELLIGENCE BY ITSELF, IT SIMPLY EXECUTES INSTRUCTIONS THAT HAVE BEEN PREPARED IN ADVANCE. IN ORDER TO ACHIEVE THIS FLEXIBILITY THE COMPUTERS MUST BE PROGRAMMED TO PERFORM EACH TASK, DIFFERENT TASKS REQUIRE DIFFERENT PROGRAMS. THESE PROGRAMS ARE SEQUENCE OF INSTRUCTIONS AND DECISION THAT COMPUTERS CARRYOUT TO ACHIEVE A TASK. THE ART OF WRITING THESE KINDS OF PROGRAMS IS NOTHING BUT PROGRAMMING.
Simple Way to learn Java Programing in two Days
STRINGS BASIC PROGRAM SERIES-1
package com.javainchennai;import java.util.Scanner;public class StringReverse {public static void main(String[] args) {Scanner sc=new Scanner(System.in);System.out.println("Enter a String");String str=sc.nextLine();int strLen=str.length();char c[]=new char[20];for(int i=0,j=strLen-1;i<strLen;i++,j--){c[i]=str.charAt(j);System.out.print(c[i]);}}}OUTPUT:-Enter a Stringmadam123321madampackage com.javainchennai;import java.util.Scanner;public class Stringpolindrome {public static void main(String[] args) {int i,j=0;Scanner sc=new Scanner(System.in);System.out.println("Enter your String:-");String str=sc.next();char c[]=new char[20];c=str.toCharArray();i=str.length();--i;while(j<=i){if(c[i]!=c[j]){System.out.println("The given string "+ str +" is not polindrome");System.exit(0);}++j;--i;}System.out.println("The given string" + str +"is polindrome");}}OUTPUT-1 :Enter your String:-javainchennaiThe given string javainchennai is not polindromeOUTPUT-2 :Enter your String:-malayalamThe given string malayalam is polindrome
FINDING THE LENGTH OF A STRINGpackage com.javainchennai;import java.util.Scanner;public class StringLength {public static void main(String[] args) {Scanner sc=new Scanner(System.in);System.out.println("Please Enter your String:-");String str=sc.nextLine();char c[]=new char[10];c= str.toCharArray();int count=0;try{for( count=0;c[count] !='\0'; count++);}catch (ArrayIndexOutOfBoundsException e) {System.out.println(count);}}}Please Enter your String:-questionabanksThe Length of the Given String is: 13
FINDING THE NUMBER OF WORDS IN A STRINGpackage com.javainchennai;import java.util.Scanner;public class NoOfWordsInAString {public static void main(String[] args) {Scanner sc=new Scanner(System.in);System.out.println("Enter your string:-");String str=sc.nextLine();int strLen=str.length();int word=1;for(int i=0;i<strLen-1;i++){if((str.charAt(i))==' '){word++;}}System.out.print("The Number of words in the Given String are :" +word);}}OUTPUT:-Enter your string:-question banksThe Number of words in the Given String are :2
--------------------------------------------------------------------------------------------------------------
Before going into programs a small introduction on StringsIf there is any mistakes in this article please write me blog4helping@gmail.com======================-:STRINGS:-======================1.String is a class in Java2.String means collection of characters3.String is a sequence of characters enclosed in double Quotes.4.Java Strings are sequence of Unicode characters5.String class produces Immutable objects.6.String class does not have a methods that let you change a characters in an existing String.7.It is like number 5 , the String "HELLO" we cannot change it.Sting Objects can be created in 2 ways1. without using new operatorString str1="javainchennai";2. with using new operatorString str2=new String("javainchennai");The memory space is divided in to 2 parts1.constant area2.non-constant areaIf you create object without using new operator this will be saved in constant areaString str1="javainchennai";If you create object with using new operator this will be saved in non-constant areaString str2=new String("javainchennai");Here Constant area will not allow duplicateswhere as non-constant area will allow duplicates.Do Remember inside a String class the toString() method is overidedHere if you try to print reference variableString s1="javainchennai";System.out.println(s1);The output is javainchennai instead of String@ff2201(classname @ hexadecimal value)equals() method also overrided to check 2 objects based on the value(content) it containsobserve the program carefully and read the explanation:-1.package com.qb;2.public class StringTest {3. public static void main(String[] args) {4. String str1="javainchennai";5. String str2="javainchennai";6. String str3=new String("javainchennai");7. String str4=new String("javainchennai");8. System.out.println(str1==str2);9. System.out.println(str1==str3);10. System.out.println(str2==str3);11. System.out.println(str3==str4);12. System.out.println(str1.equals(str2));13. System.out.println(str1.equals(str3));14. System.out.println(str2.equals(str3));15. System.out.println(str3.equals(str4));16. }17. }output:-truefalsefalsefalsetruetruetruetrueexplanation:-If you say 5==5 is true, here two are primitive literals so == operator(checks content) prints true.If you use == operator to compare two object references it will see whether both references are pointing to same object or different.If both references are pointing to same object it(== operator) returns true otherwise false.observe line4 and line5 ,here actually I created String object without using new operator so, str1 and str2 both references are pointing to same object (javainchennai). (constant area will not allow duplicates)so, str1==str2 returns true.observe line4 and line5 ,here actually I created String object by using new operator so, str3 and str4 both references are pointing to different objects (javainchennai).(non constant area allows duplicates).So, str3==str4 returns false.Observe the same effect with equals() method it returns true all time .(because it is overrided to compare based on content inside object)PROGRAMS:-program:-1.public class StringTest {2. public static void main(String[] args) {3. System.out.println(3+5);4. System.out.println("3"+5);5. System.out.println(3+"555");6. System.out.println(3+2+5+"4444");7. System.out.println("35"+111+"99");8. System.out.println("42"+11+32+"77");9. System.out.println("100"+"222");}}OUTPUT:-8353555104444351119942113277100222Explanation:--------------In Java there is no operator overloading concept.+ is the only one operator overloaded to add 2 integers as well as 2 stringsIn the above example we added 2 primitives that is common ,when we added String with any primitives only String object is produced.observe the output of lines 6,7,8,9.
DIFFERENCES BETWEEN STRING , STRINGBUFFER AND STRINGBUILDER
String:-
------------------1.String class introduced in jdk1.02.String class is a final class and implements Serializable,Comparable and CharSequence interfaces3.String Objects can be created in two ways a.Using new operatorconstructors to create String obb.Without using new operator 4.----- 5. String class has several jects(both using new or without using new operator) a.String s1="";that it represents an empty charb.String s2=new String(""); Initializes a String object so acter sequence. c.String s1="javainchenna";Initializes a String object so that it re p is no delete method to delete a characters from . 7.StringBuilder objects are Non-Synchronized. ------------------5.String class has no append method.
resents the same sequence of characters as the argument
6.ThereStringBuffer:-------------------StringBuffer and StringBuilder has the same methods:-1.String class introduced in jdk1.02.String class is a final class and im pated without using new operator StringBuffer s2="javainchennai";(wrong way)
lements Serializable and CharSequence interfaces
3
.StringBuffer Objects cannot be cre4.use new operator to create objects of StringBuffer StringBuffer sb1=new StringB u characters in it and an initial capacity of 16 characters.
ffer("");
Constructs a StringBuffer with no5.StringBuffer class has append() method , It appends the stri nobject. 7.StringBuffer objects are Synchronized.StringBuffer was being used by a single thread. ------------------
g representation of the any type(primitive or derived) argument to the sequence.
6
.There is a delete method to delete a characters from thisStringBuilder:-------------------.String class introduced in jdk1.51,2. S.StringBuffer Objects cannot be created without using new operator
tring class is a final class and implements Serializable and CharSequence interfaces
3StringBuilder s3="javainchennai";(wrong way) 4.use new opera tgBuilder sb1=new StringBuilder();
or to create objects of StringBuilder
StrinConstructs a StringBuilder w id() method,It appends the string representation of the any type(primitive or derived) argument to the sequence.
th no characters in it and an initial capacity of 16 characters.
5.Str i
ngBuilder class has append.6. There is a delete method to delete a characters from this object. 7.StringBuilder objects are Non-Synchronize
--------------------------------------------------------------------------------------------------------------
FIND BIGGEST OF 3 NUMBERS:import java.util.Scanner;public class biggest{public static void main(String[] args){System.out.println("Enter 3 numbers");Scanner sc=new Scanner(System.in);int a=sc.nextInt();int b=sc.nextInt();int c=sc.nextInt();int max=a;if(b>max)max=b;if(c>max)max=c;System.out.println("The biggest of 3 numbers:"+max);}}Output:Enter 3 numbers659843The biggest of 3 numbers:98
FIND GIVEN NUMBER IS ODD OR EVEN:import java.util.Scanner;public class evenodd{public static void main(String[] args){System.out.println("Enter the number");Scanner sc=new Scanner(System.in);int num=sc.nextInt();if(num/2==1)System.out.println("Number is ODD");elseSystem.out.println("Number is EVEN");}}Output:Enter the number88Number is EVEN
FIND GIVEN NUMBER IN PERFECT SQUARE OR NOT:import java.util.Scanner;public class perfectsquare{public static void main(String[] args){System.out.println("Enter a number");Scanner sc=new Scanner(System.in);int num=sc.nextInt();double num1=Math.sqrt(num);double num2=num1;if(num1==num2)System.out.println(num + "is a perfect square");elseSystem.out.println(num + "is not a perfect square");}}Output:Enter a number100100is a perfect square
WRITE A PROGRAM TO FIND GIVEN NUMBER IS PALINDROME OR NOTimport java.util.Scanner;public class PalindromeOfNumber{public static void main (String[] args){int mod=0;int c=0;int d=0;int num1=0;System.out.println("Enter a number:");Scanner sc=new Scanner(System.in);int num=sc.nextInt();num1=num;while(num>0){mod=num%10;c=c+mod;num=num/10;d=mod+d*10;}if(num1==d){ System.out.println("The given number "+num1+" is palindrome");}else{System.out.println("The given number "+num1+" is not palindrome");}}}OUTPUT:RUN 1:Enter a number:1523The given number 1523 is not palindrome
WRITE A PROGRAM TO FIND GIVEN NUMBER IS PRIME OR NOTimport java.util.Scanner;public class PrimeOrNot{public static void main(String[] args){System.out.println("Enter the number:");Scanner sc=new Scanner(System.in);int i;int flag=0;long num=sc.nextLong();if(num<=3)System.out.println("The given number is prime:");elsefor(i=2;i<=num/2;i++)if(num%i==0){flag=1;break;}elseflag=0;if(flag==1)System.out.println("The given number "+num+" is not prime");elseSystem.out.println("The given number "+num+" is prime");}}Output1:Enter the number:5The given number 5 is primeOutput2:Enter the number:55The given number 55 is not prime
WRITE A PROGRAM TO DISPLAY MULTIPLICATION TABLEimport java.util.Scanner;public class multiplicationtable{public static void main(String[] args){System.out.println("Enter the table number and the count value:");Scanner sc=new Scanner(System.in);int tnum=sc.nextInt();int count=sc.nextInt();System.out.println("The table is ...");for(int i=1;i<=count;i++){System.out.println(tnum+"*"+i+"=" + i*tnum);}}}Output:Enter the table number and the count value:810The table is ...8*1=88*2=168*3=248*4=328*5=408*6=488*7=568*8=648*9=728*10=80
WRITE A PROGRAM TO FIND COMMAND LINE NUMBER COUNTpublic class CommandLineNumbersCount{public static void main(String[] args){int l=args.length;System.out.println(l);}}OUT PUT:Java CommandLineNumbersCount 10 5 23 4 25java CommandLineNumbersCount 21 3 36 44
WRITE A PROGRAM TO SORT THE DIGITS OF A NUMBER IN ASCENDING ORDERimport java.util.Scanner;public class SortDigitsInInteger{public static void main(String[] args){Scanner sc=new Scanner(System.in);System.out.println("Enter a number:-");int num=sc.nextInt();int a,i=0;int sort[]=new int[10];while(num>0){a=num%10;sort[i]=a;i++;num=num/10;}for(int j=0;j<i-1;j++)for(int k=j+1;k<i;k++)if(sort[j]>sort[k]){int temp=sort[j];sort[j]=sort[k];sort[k]=temp;}System.out.println("The digits in number ascending order:");for(int j=0;j<i;j++)System.out.print(sort[j]+" ");}}OUTPUT:Enter a number:-4261The digits in number ascending order:1 2 4 6
WRITE A PROGRAM TO SORT A NUMBER IN ASCENDING ORDERimport java.util.Scanner;public class SortNumbersInAscendingOrder{public static void main(String[] args){Scanner sc=new Scanner(System.in);System.out.println("Enter Number of elements:-");int limit=sc.nextInt();System.out.println(" Enter Elements:- ");int a[]=new int[10];for(int i=1;i<=limit;i++){a[i]=sc.nextInt();}for(int i=0;i<limit-1;i++)for(int j=i;j<limit;j++)if(a[i]>a[j]){int temp=a[i];a[i]=a[j];a[j]=temp;}System.out.println("The sorted list is:-");for( int i=0;i<limit;i++)System.out.print(" "+a[i]);}}OUTPUT:Enter Number of elements:-5Enter Elements:-15 25 16 12 4The sorted list is:-0 12 15 16 25
-------------------------------------------------------------------------------------------------
PROGRAMMING WITH RECURSION
Fibonacci seriesimport java.util.Scanner;public class FibonacciSeries{public static void main(String[] args){int x=0,y=1;Scanner sc=new Scanner(System.in);System.out.println("Enter a Number:-");int z=sc.nextInt();System.out.println("The fibo series is:- ");fiboSeries(z,x,y);}private static void fiboSeries(int x,int f,int f1){if(x==0)System.exit(0);System.out.print(" " + (f+f1));fiboSeries(--x,f1,f+f1);}}OUTPUTEnter a Number:-8The fibo series is:-1 2 3 5 8 13 21 34Enter a Number:-10The fibo series is:-1 2 3 5 8 13 21 34 55 89
Tribonacci series
mport java.util.Scanner;i
ublic class TribonacciSeriesp{public static void main(String[] args){int x=-1,y=1,z=0;Scanner sc=new Scanner(System.in);System.out.println("Enter a Number:-");int n=sc.nextInt();System.out.println("The tribo series is:- ");triboSeries(n,z,x,y);}private static void triboSeries(int x,int f,int f1,int f2){if(x==0)System.exit(0);System.out.print(" " + (f+f1+f2));triboSeries(--x,f1,f2,f+f1+f2);}}OUTPUTEnter a Number:-10The tribo series is:-0 0 1 1 2 4 7 13 24 44Enter a Number:-8The tribo series is:-0 0 1 1 2 4 7 13WRITE A PROGRAM TO FIND THE POWER OF THE NUMBERimport java.util.Scanner;public class XpowN{public static void main(String[] args){Scanner sc=new Scanner(System.in);System.out.println("Enter the values of X and N:-");double x=sc.nextDouble();int n=sc.nextInt();System.out.println(power(x,n));}private static double power(double x,int n){double pow=0;pow= ((n==0)?1:x*power(x,n-1));return pow;}}OUTPUTEnter the values of X and N:-105100000.0Enter the values of X and N:-5 225.0
--------------------------------------------------------------------------------------------------------------
PROGRAM TO READ AN INTEGER AND REDUCE IT TO A SINGLE DIGITimport java.util.Scanner;public class DigitReduce{public static void main(String[] args){Scanner sc=new Scanner(System.in);System.out.println("Enter a Number:-");long num=sc.nextLong();System.out.println(" " + calculateDigit(num));}private static long calculateDigit(long num){return (num/10 == 0 ? num : calculateDigit(num/10 + num % 10));}}OUTPUTEnter a Number:-47891Enter a Number:-33489
WRITE A PROGRAM TO DISPLAY AMOUNT INTO 500’S,100’S,50’S,20’S,10’S,5’S,2’S,1’S IN A GIVEN NUMBERimport java.util.Scanner;public class AmountCount{public static void main(String[] args){System.out.println("Enter the amount in rupees:-");Scanner sc=new Scanner(System.in);int num=sc.nextInt();while(num>=500){int a=num/500;System.out.print("\n The no .of five hundreds are:- "+ a);break;}while(num>=100){int a=num/100;System.out.print("\n The no .of hundreds are :-"+ a);break;}while(num>=50){int a=num/50;System.out.print("\n The no .of fiftie's are "+ a);break;}while(num>=20){int a=num/20;System.out.print("\n The no .of twenty's are "+ a);break;}while(num>=10){int a=num/10;System.out.print("\n The no .of ten's are "+ a);break;}while(num>=5){int a=num/5;System.out.print("\n The no .of five's are "+ a);break;}while(num>=2){int a=num/2;System.out.print("\n The no .of two's are "+ a);break;}while(num>=1){int a=num/1;System.out.print("\n The no.of one's are"+ a);break;}}}OUTPUT:Enter the amount in rupees:-1854The no .of five hundreds are 3The no .of hundreds are 18The no .of fiftie's are 37The no .of twenty's are 92The no .of ten's are 185The no .of five's are 370The no .of two's are 927The no.of one's are1854
WRITE A PROGRAM TO SORT A NUMBER IN ASCENDING ORDERimport java.util.Scanner;public class SortNumbersInAscendingOrder{public static void main(String[] args){Scanner sc=new Scanner(System.in);System.out.println("Enter Number of elements:-");int limit=sc.nextInt();System.out.println(" Enter Elements:- ");int a[]=new int[10];for(int i=1;i<=limit;i++){a[i]=sc.nextInt();}for(int i=0;i<limit-1;i++)for(int j=i;j<limit;j++)if(a[i]>a[j]){int temp=a[i];a[i]=a[j];a[j]=temp;}System.out.println("The sorted list is:-");for( int i=0;i<limit;i++)System.out.print(" "+a[i]);}}OUTPUT:Enter Number of elements:-5Enter Elements:-15 25 16 12 4The sorted list is:-0 12 15 16 25
--------------------------------------------------------------------------------------------------------------
WRITE A PROGRAM TO CONVERT INTEGER INTO IT’S EQUIVALENT NAMEimport java.util.Scanner;public class IntegerToItsEqualentName{public static void main(String[] args){Scanner sc=new Scanner(System.in);System.out.println("Enter Number");int num=sc.nextInt();int m=0,c=0;int a[]=new int[10];while(num>0){m=num%10;a[c]=m;num=num/10;c++;}for(int k=c-1;k>=0;k--){switch (a[k]){case 0:System.out.print("ZERO ");break;case 1:System.out.print("ONE ");break;case 2:System.out.print("TWO ");break;case 3:System.out.print("THREE ");break;case 4:System.out.print("FOUR ");break;case 5:System.out.print("FIVE ");break;case 6:System.out.print("SIX ");break;case 7:System.out.print("SEVEN ");break;case 8:System.out.print("EIGHT ");break;case 9:System.out.print("NINE ");break;default:break;}}}}OUTPUT:Enter Number12069ONE TWO ZERO SIX NINE
PROGRAM FOR SWAPPING TWO NUMBERS USING THREE VARIABLESimport java.util.Scanner;public class Output{public static void main(String[] args){System.out.println ("enter 2 numbers");Scanner sc=new Scanner(System. in);int num1 =sc.nextInt();int num2 =sc.nextInt();System.out.println("Before swapping");System.out.println("num1:"+num1+"\n"+"num2:"+num2);int temp=num1;num1=num2;num2=temp;System.out.println("After swapping");System.out.println("num1:"+num1+"\n"+"num2:"+num2);}}Output:enter 2 numbers5565Before swappingnum1:55num2:65After swappingnum1:65num2:55
PROGRAM FOR SWAPPING TWO NUMBERS WITHOUT USING THIRD VARIABLEimport java.util.Scanner;public class swapping2{public static void main(String args[]){System.out.println("Enter 2 numbers");Scanner sc=new Scanner(System.in);int num1=sc.nextInt();int num2=sc.nextInt();System.out.println("Before swapping");System.out.println("num1:"+num1+"\n"+"num2:"+num2);num1=num1+num2;num2=num1-num2;num1=num1-num2;System.out.println("After swapping");System.out.println("num1:"+num1+"\n"+"num2:"+num2);}}Output:Enter 2 numbers2332Before swappingnum1:23num2:32After swappingnum1:32num2:23
SWAPPING 2 NUMBERS WITHOUT USING ARITHMETIC OPERATORSimport java.util.Scanner;public class arithmatic{public static void main(String[] args){System.out.println("Enter 2 numbers");Scanner sc=new Scanner(System.in);int num1=sc.nextInt();int num2=sc.nextInt();System.out.println("Before swapping");System.out.println("num1:"+num1+"\n"+"num2:"+num2);num1=num1^num2;num2=num1^num2;num1=num1^num2;System.out.println("After swapping");System.out.println("num1:"+num1+"\n"+"num2:"+num2);}}Output:Enter 2 numbers1991Before swappingnum1:19num2:91After swappingnum1:91num2:19
--------------------------------------------------------------------------------------------------------------
WHETHER IT IS C , C++, C# OR JAVA , WORKING WITH THESE KIND OF PROGRAMS GIVES YOU LOT OF FUN :-
Write a program to display the following output12 23 3 34 4 4 45 5 5 5 5import java.util.Scanner;public class ForLoop1{public static void main(String[] args){System.out.println("Enter the limit:-");Scanner sc=new Scanner(System.in);int limit=sc.nextInt();for(int i=1;i<=limit;i++){for(int j=1;j<=i;j++){System.out.print( i +" ");}System.out.println();}}}Enter the limit:-512 23 3 34 4 4 45 5 5 5 5
Write a program to display the following output11 21 2 31 2 3 41 2 3 4 5package com.vel.nestedforloop;import java.util.Scanner;public class ForLoop2{public static void main(String[] args){System.out.println("Enter the limit:-");Scanner sc=new Scanner(System.in);int limit=sc.nextInt();for(int i=1;i<=limit;i++){for(int j=1;j<=i;j++){System.out.print( j +" ");}System.out.println();}}}Enter the limit:-511 21 2 31 2 3 41 2 3 4 5
Write a program to display the following output12 34 5 67 8 9 1011 12 13 14 1516 17 18 19 20 21package com.vel.nestedforloop;import java.util.Scanner;public class ForLoop3{public static void main(String[] args){System.out.println("Enter the limit:-");Scanner sc=new Scanner(System.in);int limit=sc.nextInt();int k=1;for(int i=1;i<=limit+1;i++){for(int j=1;j<=i;j++){System.out.print( k++ +" ");}System.out.println();}}}Enter the limit:-512 34 5 67 8 9 1011 12 13 14 1516 17 18 19 20 21
WRITE A PROGRAM TO DISPLAY THE FOLLOWING OUTPUT3 2 1 0 1 2 3import java.util.Scanner;public class LineFormat{public static void main(String[] args){int i,j,k;System.out.println("Enter Limit:-");Scanner sc= new Scanner(System.in);int n=sc.nextInt();k=n;for(i=0;n>=i;i++,k--)System.out.print(" "+k);k=1;for(j=0;j<n;j++,k++)System.out.print(" "+k);}}OUTPUTEnter Limit:-33 2 1 0 1 2 3
Write a program to display the following output11 11 1 1import java.util.Scanner;public class NumberGenerator{public static void main(String[] args){int i,j;System.out.println("ENTER THE NUMBER TO BE DISPLAYED :-");Scanner sc=new Scanner(System.in);int a=sc.nextInt();System.out.println("ENTER THE SIZE :-");int n=sc.nextInt();for(i=0;i<n;i++){for(j=0;j<=i;j++)System.out.print(" "+a);System.out.println();}}}ENTER THE NUMBER TO BE DISPLAYED :-1ENTER THE SIZE :-311 11 1 1
WRITE A PROGRAM TO DISPLAY THE FOLLOWING OUTPUTENTER THE LIMIT:-612 13 2 14 3 2 15 4 3 2 1import java.util.Scanner;public class GenerateNumber1{public static void main(String[] args){int i,j;System.out.println( "ENTER THE LIMIT:-");Scanner sc=new Scanner(System.in);int n=sc.nextInt();for(i=1;i<n;i++){for(j=i;j>0;j--){System.out.print(j+" ");}System.out.println();}}}OUTPUTENTER THE LIMIT:-612 13 2 14 3 2 15 4 3 2 1
Write a program to print the following output1 0 0 00 2 0 00 0 3 00 0 0 4import java.util.Scanner;public class GenerateNumber1{public static void main(String[] args){int i,j,x=0;System.out.println( "ENTER THE LIMIT:-");Scanner sc=new Scanner(System.in);int n=sc.nextInt();for(i=1;i<=n;i++){for(j=1;j<=n;j++){if(i==j)System.out.print(i+" ");elseSystem.out.print(x +" ");}System.out.println();}}}
Write a program to print the following output with the given characterENTER THE CHARACTER TO BE DISPLAYED:-7ENTER THE LIMIT:-47 7 7 77 7 7 77 7 7 77 7 7 7import java.util.Scanner;public class GenerateNumber1{public static void main(String[] args){int i,j,x=0;Scanner sc=new Scanner(System.in);System.out.println("ENTER THE CHARACTER TO BE DISPLAYED:-");int c=sc.nextInt();System.out.println( "ENTER THE LIMIT:-");int n=sc.nextInt();for(i=1;i<=n;i++){for(j=1;j<=n;j++){System.out.print(c+" ");}System.out.println();}}}
.Write a program to print the following output with the given characterENTER THE CHARACTER TO BE DISPLAYED:-8ENTER THE LIMIT:-48 8 8 88 88 88 8 8 8import java.util.Scanner;public class GenerateNumber1{public static void main(String[] args){int i,j,x=0;Scanner sc=new Scanner(System.in);System.out.println("ENTER THE CHARACTER TO BE DISPLAYED:-");int c=sc.nextInt();System.out.println( "ENTER THE LIMIT:-");int n=sc.nextInt();for(i=1;i<=n;i++){for(j=1;j<=n;j++){if(i==1||j==1||j==n||i==n)System.out.print(c+" ");elseSystem.out.print(" ");}System.out.println();}}}
Program to read an integer and reduce it to a single digitimport java.util.Scanner;public class DigitReduce{public static void main(String[] args){Scanner sc=new Scanner(System.in);System.out.println("Enter a Number:-");long num=sc.nextLong();System.out.println(" " + calculateDigit(num));}private static long calculateDigit(long num){return (num/10 == 0 ? num : calculateDigit(num/10 + num % 10));}}OUTPUTEnter a Number:-47891Enter a Number:-33489
Subscribe to:
Posts (Atom)















