Posts
Showing posts from November, 2020
How to insert Header and Footer
- Get link
- X
- Other Apps
Q. What is header and footer? A header is the top margin of each page, and a footer is the bottom margin of each page. Headers and footers are useful for including material that you want to appear on every page of a document such as your name, the title of the document, or page numbers. Q- How to insert Header and Footer Ans- click insert tab-> header or footer-> then insert
How to give hyper link from one document to another
- Get link
- X
- Other Apps
Select the text or object you want to use as a hyperlink . Right-click and then click Hyperlink . Under Link to, click Place in This Document. In the list, select the heading or bookmark that you want to link to or select the text ->click inset tab-> click hyperlink-> one window will open-> then chose the file -> ok
how to change the font size and color in ms-word
- Get link
- X
- Other Apps
// change font color Select the text that you want to change . · On the Home tab, in the Font group, choose the arrow next to Font Color , and then select a color . // change font size Select the text that you want to change . · On the Home tab, in the Font group, choose the arrow next to Font Size , and then select a size .
how to save file in ms-word
- Get link
- X
- Other Apps
open ms-word ->save option ->(one window will open)->write the file name ->save To use the Save As/save command: Click the Microsoft Office button . Select Save As/save Word Document . The Save As dialog box appears. Select the location where you want to save the document using the drop-down menu. Enter a name for the document. Click the Save button.
series-11
- Get link
- X
- Other Apps
1 0 1 1 0 1 0 1 0 1 class series { public static void main(String args[]) { for(int r=1;r<=4;r++) { for (int c=1 ; c<=r ; c++) { if((r+c)%2==0) System.out.print(1+ " "); else System.out.print(0+" "); } System.out.println() // to come to next line } } } // common way class series { public static void main(String args[]) { int d=1; // how many element in first line for(int r=1;r<=4;r++) { for (int c=1 ; c<=d ; c++) { if((r+c)%2==0) System.out.print(1+ " "); else System.out.print(0+" "); } d++; System.out.println() // to come to next line } } }
series-10
- Get link
- X
- Other Apps
1 1 0 1 0 1 1 0 1 0 class series { public static void main(String args[]) { for(int r=1;r<=4;r++) { for (int c=1 ; c<=r ; c++) { if(c%2==0) System.out.print(0+ " "); else System.out.print(1+" "); } System.out.println() // to come to next line } } } //Common way class series { public static void main(String args[]) { int d=1; // how many element in first line for(int r=1;r<=4;r++) { for (int c=1 ; c<=d ; c++) { if(c%2==0) System.out.print(0+ " "); else System.out.print(1+" "); } d++; System.out.println() // to come to next line } } }
series-9
- Get link
- X
- Other Apps
* * * * * * * * * * class series { public static void main(String args[]) { for(int r=1;r<=4;r++) { for (int c=1 ; c<=r ; c++) { System.out.print("*"+ " "); } System.out.println() // to come to next line } } } // common way class series { public static void main(String args[]) { int d=1; // d- means how many element in first line for(int r=1;r<=4;r++) { for (int c=1 ; c<=d ; c++) { System.out.print('*'+ " "); } d++; System.out.println() // to come to next line } } }
series-6
- Get link
- X
- Other Apps
1 2 3 4 5 6 class series { public static void main(String args[]) { int a=1; for(int r=1 ; r<=3 ; r++) { for (int c=1 ; c<=r ; c++) { System.out.print(a+ " "); a++; } System.out.println() // to come to next line } } } // common way class series { public static void main(String args[]) { int a=1, d=1; // a- means first value d- means how many element in first line for(int r=1;r<=4;r++) { for (int c=1 ; c<=d ; c++) { System.out.print(a+ " "); a++; } d++; System.out.println() // to come to next line } } }
series-5
- Get link
- X
- Other Apps
1 2 3 4 5 2 3 4 5 3 4 5 4 5 5 class series { public static void main(String args[]) { for(int r=5 ; r>=1 ; r--) { for (int c=r ; c<=5 ; c++) { System.out.print(c+ " "); } System.out.println() // to come to next line } } } // common way class series { public static void main(String args[]) { int a=1, d=5; // a- means first value d- means how many element in first line for(int r=1;r<=4;r++) { a=r; for (int c=1 ; c<=d ; c++) { System.out.print(a+ " "); a++; } d--; System.out.println() // to come to next line } } }
series-4
- Get link
- X
- Other Apps
1 1 1 1 2 2 2 2 3 3 3 3 class series { public static void main(String args[]) { for(int r=1;r<=3;r++) { for (int c=1 ; c<=4 ; c++) { System.out.print(r+ " "); } System.out.println() // to come to next line } } } // common way class series { public static void main(String args[]) { int a=1, d=4; // a- means first value d- means how many element in first line for(int r=1;r<=3;r++) { for (int c=1 ; c<=d ; c++) { System.out.print(a+ " "); } a++; System.out.println() // to come to next line } } }
series-3
- Get link
- X
- Other Apps
1 2 3 4 1 2 3 4 1 2 3 4 class series { public static void main(String args[]) { for(int r=1;r<=3;r++) { for (int c=1 ; c<=4 ; c++) { System.out.print(c+ " "); } System.out.println() // to come to next line } } } // common way class series { public static void main(String args[]) { int a=1, d=4; // a- means first value d- means how many element in first line for(int r=1;r<=4;r++) { a=1; for (int c=1 ; c<=d ; c++) { System.out.print(a+ " "); a++; } System.out.println() // to come to next line } } }
series-2
- Get link
- X
- Other Apps
5 4 3 2 1 5 4 3 2 5 4 3 5 4 5 // shortcut way class series { public static void main(String args[]) { for(int r=1;r<=5;r++) // r- for row { for (int c=5 ; c>=r ; c--)// c- column { System.out.print(c+ " "); } System.out.println() // to come to next line } } } // common way class series { public static void main(String args[]) { int a=5, d=5; // a- means first value d- means how many element in first line for(int r=1;r<=5;r++) { a=5; for (int c=1 ; c<=d ; c++) { System.out.print(a+ " "); a--; } d--; System.out.println() // to come to next line } } }
series-1
- Get link
- X
- Other Apps
1 1 2 1 2 3 1 2 3 4 //short cut way class series { public static void main(String args[]) { for(int r=1;r<=4;r++) { for (int c=1 ; c<=r ; c++) { System.out.print(c+ " "); } System.out.println() // to come to next line } } } // common way class series { public static void main(String args[]) { int a=1, d=1; // a- means first value d- means how many element in first line for(int r=1;r<=4;r++) { a=1; for (int c=1 ; c<=d ; c++) { System.out.print(a+ " "); a++; } d++; System.out.println() // to come to next line } } }
series program
- Get link
- X
- Other Apps
1 2 3 4 5 1 2 3 4 1 2 3 1 2 1 class series { public static void main(String args[]) { for(int r=5 ; r>=1 ; r--) { for (int c=1 ; c<=r ; c++) { System.out.print(c+ " "); } System.out.println() // to come to next line } } } // common way class series { public static void main(String args[]) { int a=1, d=5; // a- means first value d- means how many element in first line for(int r=1;r<=4;r++) { a=1; for (int c=1 ; c<=d ; c++) { System.out.print(a+ " "); a++; } d++; System.out.println() // to come to next line } } }
check the number is binary or not(using java)
- Get link
- X
- Other Apps
// a number is said to binary if all the digit should be either zero or one ex-1011 binary number ex-1201 not binary number class binary { public static void main(String args[]) { int no=125,b=0,e=0; while(no>0) { b=n0%10; no=no/10; if(b>1) { e=1; break; } } if(e==0) System.out.println("the number is binary"); else System.out.println("the number is not binary"); } }
program to caluclate automerphic number(using java)
- Get link
- X
- Other Apps
// if a number is present at the end of its square ex- 25 sqr=625 (25 is present at the end of 625) class automerphic { public static void main(String args[]) { int no=125, sqr=0,b=0,c=0,e=0; sqr=no* no; while(no>0 && sqr>0) { b=n0%10; no=no/10; c=sqr%10; sqr=sqr/10; if( b !=c) { e=1; // e is the marking symbol break; }} if(e==0) System.out.println("automerphic"); else System.out.println("not auto merphic"); } }
program to find smallest digit of a number(using java)
- Get link
- X
- Other Apps
program to find greatest digit of a number(using java)
- Get link
- X
- Other Apps
programe to add all the digit of a number (using java)
- Get link
- X
- Other Apps
check the number is Amstrong (using java)
- Get link
- X
- Other Apps
// if the addition of cube of all the digit of a number is same as original number ex- 153 1^3+5^3+3^3=153 class amstrong { public static void main(String args[]) { int no=125, sum=0,copy=0,b=0; while(no>0) { b=n0%10; no=no/10; sum=sum+b * b * b; } if(copy= =sum) System.out.println("amstrong number"); else System.out.println("not amstrong"); } }
check the number is palin drome(using java)
- Get link
- X
- Other Apps
// if the reverse of a number is same as original number then the number is palindrome // ex- a=121 ans -121 a=125 ans -521 is not palindrome class palindrome { public static void main(String args[]) { int no=125, rev=0,b=0 copy=no; while(no>0) { b=n0%10; no=no/10; rev=rev *10+b; } if(copy==rev) System.out.println("palindrome"); else System.out.println("not palindrome"); } }
check the number is perfect (using java)
- Get link
- X
- Other Apps
//if the addition of factors of a number except that number is same as original number then the number is perfect ex n0=6 factor 1,2,3 that means 1+2+3=6 then it is perfect number class perfect { public static void main(String args[]) { int no=10,sum=0; for(int i=1; i<no ; i++) { if(no%i==0) // i is the factor of that number { sum=sum+i } } if(sum==no) System.out.println("perfect number"); else System.out.println("not"); }}