Vedic Math Tricks

. . . . Square of a Number Ending With 5 As a Unit Digit:   Suppose the Number Ends with 5 as Unit Digit is (a5) then (a5)^2 is a(a+1)/25 FOR EXAMPLE :                                     25^2 is 2(2+1)/25 i.e 2(3)/25 and the final…

21,301 total views, 52 views today

Read More

Java Program To Find Area And Perimeter Of Square

import java.lang.*; class Square { public static void main(String args[]) { float s=2.3f,area,peri; System.out.println(“\nSquare:\n”); System.out.println(“Side of the square : “+s); area=(s*s); peri=(4*s); System.out.println(“Area of the square : “+area); System.out.println(“Perimeter of the square : “+peri); } } 46,790 total views, 28 views today

46,790 total views, 28 views today

Read More

Java Program To Find Area And Perimeter Of Rectangle

import java.lang.*; class Rectangle { public static void main(String args[]) { float a=5.3f,b=6.3f,area,peri; System.out.println(“\nRectangle:\n”); System.out.println(“Sides of the Rectangle a : “+a+” b : “+b); area=(a*b); peri=(2*(a+b)); System.out.println(“Area of the Rectangle : “+area); System.out.println(“Perimeter of the Rectangle : “+peri); } } 39,627 total views, 278 views today

39,627 total views, 278 views today

Read More

Java Program To Demonstrate Logical Operators

import java.lang.*; class Logical_Operators { public static void main(String args[]) { System.out.println(“\nLogical AND : \n”); System.out.println(“True && True : “+(true&&true)); System.out.println(“True && False : “+(true&&false)); System.out.println(“False && True : “+(false&&true)); System.out.println(“False && False : “+(false&&false)); System.out.println(“\nLogical OR : \n”); System.out.println(“True || True : “+(true||true)); System.out.println(“True || False : “+(true||false)); System.out.println(“False || True : “+(false||true)); System.out.println(“False…

23,799 total views, 160 views today

Read More

Java Program To Demonstrate Increment And Decrement Operators

import java.lang.*; class Inc_dec_operators { public static void main(String args[]) { int a=10; System.out.println(“\nIncrement Operators:\n”); System.out.println(“\nPre Increment Operator:\n”); System.out.println(“a : “+a); System.out.println(“++a : “+(++a)); System.out.println(“a : “+a); System.out.println(“\nPost Increment Operator:\n”); System.out.println(“a : “+a); System.out.println(“a++ : “+(a++)); System.out.println(“a : “+a); System.out.println(“\nDecrement Operators:\n”); System.out.println(“\nPre Decrement Operator:\n”); System.out.println(“a : “+a); System.out.println(“–a : “+(–a)); System.out.println(“a : “+a); System.out.println(“\nPost Decrement…

41,312 total views, 350 views today

Read More