Tutorials Point, posted 1d 21h ago

Java Floating Point Numbers.

import java.util.Scanner;
public class MultiplyFloatingNumbers {
   public static void main(String args[]){
      Scanner sc = new Scanner(System.in);
      System.out.println("Enter first floating point number.");
      float flt1 = sc.nextFloat();

      System.out.println("Enter second floating point number.");
      float flt2 = sc.nextFloat();

      float product = flt1*flt2;
      System.out.println("Product of given floating point numbers ::"+product);
   }
}

Tutorials Point, posted 1d 21h ago

Java Recursion

import java.util.Scanner;
public class PowerUsingRecursion {
   public static int power(int base, int exp){
      if (exp !=0){
         return (base * power(base, exp-1));
      }else {
         return 1;
      }
   }
   public static void main(String args[]){
      Scanner sc = new Scanner(System.in);
      System.out.println("Enter the base number ::");
      int base = sc.nextInt();
      System.out.println("Enter the exponent number ::");
      int exp = sc.nextInt();
      System.out.println(power(base, exp));
   }
}

Tutorials Point, posted 1d 21h ago

sfsdf

public class HelloWorld{

     public static void main(String []args){
        System.out.println("Hello World");
     }
}

Tutorials Point, posted 1d 21h ago

Java Recursion

import java.util.Scanner;
public class GCDTest {
   public static void main(String[] args) {
      int g1,g2;
      System.out.println("enter two numbers");
      Scanner sc=new Scanner(System.in);
      g1 = sc.nextInt();
      g2 = sc.nextInt();
      int gcd = gcd(g1, g2);
      System.out.printf("G.C.D of %d and %d is %d.", g1, g2, gcd);
   }
   public static int gcd(int g1, int g2)
   {
      if (g2 != 0)
         return gcd(g2, g1 % g2);
      else
         return g1;
   }
}

Tutorials Point, posted 1d 22h ago

CSS Fade Down Big Animation

<html>
   <head>

      <style>
         .animated {
            background-image: url(/css/images/logo.png);
            background-repeat: no-repeat;
            background-position: left top;
            padding-top:95px;
            margin-bottom:60px;
            -webkit-animation-duration: 10s;
            animation-duration: 10s;
            -webkit-animation-fill-mode: both;
            animation-fill-mode: both;
         }

         @-webkit-keyframes fadeOutDownBig {
            0% {
               opacity: 1;
               -webkit-transform: translateY(0);
            }
            100% {
               opacity: 0;
               -webkit-transform: translateY(2000px);
            }
         }

         @keyframes fadeOutDownBig {
            0% {
               opacity: 1;
               transform: translateY(0);
            }
            100% {
               opacity: 0;
               transform: translateY(2000px);
            }
         }

         .fadeOutDownBig {
            -webkit-animation-name: fadeOutDownBig;
            animation-name: fadeOutDownBig;
         }
      </style>

   </head>
   <body>

      <div id = "animated-example" class = "animated fadeOutDownBig"></div>
      <button onclick = "myFunction()">Reload page</button>

         <script>
            function myFunction() {
            location.reload();
         }
      </script>

   </body>
</html>

Tutorials Point, posted 1d 22h ago

CSS Fade Out Right Big Animation

<html>
   <head>

      <style>
         .animated {
            background-image: url(/css/images/logo.png);
            background-repeat: no-repeat;
            background-position: left top;
            padding-top:95px;
            margin-bottom:60px;
            -webkit-animation-duration: 10s;
            animation-duration: 10s;
            -webkit-animation-fill-mode: both;
            animation-fill-mode: both;
         }

         @-webkit-keyframes fadeOutRightBig {
            0% {
               opacity: 1;
               -webkit-transform: translateX(0);
            }
            100% {
               opacity: 0;
               -webkit-transform: translateX(2000px);
            }
         }
         @keyframes fadeOutRightBig {
            0% {
               opacity: 1;
               transform: translateX(0);
            }
            100% {
               opacity: 0;
               transform: translateX(2000px);
            }
         }

         .fadeOutRightBig {
            -webkit-animation-name: fadeOutRightBig;
            animation-name: fadeOutRightBig;
         }

      </style>
   </head>
   <body>

      <div id = "animated-example" class = "animated fadeOutRightBig"></div>
      <button onclick = "myFunction()">Reload page</button>

      <script>
         function myFunction() {
            location.reload();
         }
      </script>

</body>
</html>

Tutorials Point, posted 1d 22h ago

CSS Fade Out Up Animation

<html>
   <head>

      <style>
         .animated {
            background-image: url(/css/images/logo.png);
            background-repeat: no-repeat;
            background-position: left top;
            padding-top:95px;
            margin-bottom:60px;
            -webkit-animation-duration: 10s;
            animation-duration: 10s;
            -webkit-animation-fill-mode: both;
            animation-fill-mode: both;
         }

         @-webkit-keyframes fadeOutUp {
            0% {
               opacity: 1;
               -webkit-transform: translateY(0);
            }
            100% {
               opacity: 0;
               -webkit-transform: translateY(-20px);
            }
         }

         @keyframes fadeOutUp {
            0% {
               opacity: 1;
               transform: translateY(0);
            }
            100% {
               opacity: 0;
               transform: translateY(-20px);
            }
         }

         .fadeOutUp {
            -webkit-animation-name: fadeOutUp;
            animation-name: fadeOutUp;
         }
      </style>
   </head>

   <body>
      <div id = "animated-example" class = "animated fadeOutUp"></div>
      <button onclick = "myFunction()">Reload page</button>

      <script>
         function myFunction() {
           location.reload();
        }
      </script>
   </body>
</html>

Tutorials Point, posted 1d 22h ago

CSS Fade Out Up Big Animation

<html>
   <head>

      <style>
         .animated {
            background-image: url(/css/images/logo.png);
            background-repeat: no-repeat;
            background-position: left top;
            padding-top:95px;
            margin-bottom:60px;
            -webkit-animation-duration: 10s;
            animation-duration: 10s;
            -webkit-animation-fill-mode: both;
            animation-fill-mode: both;
         }

         @-webkit-keyframes fadeOutUpBig {
            0% {
               opacity: 1;
               -webkit-transform: translateY(0);
            }
            100% {
               opacity: 0;
               -webkit-transform: translateY(-2000px);
            }
         }

         @keyframes fadeOutUpBig {
            0% {
               opacity: 1;
               transform: translateY(0);
            }
            100% {
               opacity: 0;
               transform: translateY(-2000px);
            }
         }

         .fadeOutUpBig {
            -webkit-animation-name: fadeOutUpBig;
            animation-name: fadeOutUpBig;
         }
      </style>

   </head>
   <body>

      <div id = "animated-example" class = "animated fadeOutUpBig"></div>
      <button onclick = "myFunction()">Reload page</button>

      <script>
         function myFunction() {
            location.reload();
         }
      </script>

   </body>
</html>

Tutorials Point, posted 1d 22h ago

CSS Flash Animation Effect

<html>
   <head>
      <style>
         .animated {
            background-image: url(/css/images/logo.png);
            background-repeat: no-repeat;
            background-position: left top;
            padding-top:95px;
            margin-bottom:60px;
            -webkit-animation-duration: 1s;
            animation-duration: 1s;
            -webkit-animation-fill-mode: both;
            animation-fill-mode: both;
         }

         @keyframes flash {
            0%, 50%, 100% {
            opacity: 1;
         }
         25%, 75% {
            opacity: 0;
         }
      }

      .flash {
         animation-name: flash;
      }
   </style>

   </head>
   <body>

      <div id = "animated-example" class = "animated flash"></div>
      <button onclick = "myFunction()">Reload page</button>

      <script>
         function myFunction() {
            location.reload();
         }
      </script>
   </body>
</html>

Tutorials Point, posted 1d 22h ago

CSS Flip Animation Effect

<html>
   <head>
      <style>
         .animated {
            background-image: url(/css/images/logo.png);
            background-repeat: no-repeat;
            background-position: left top;
            padding-top:95px;
            margin-bottom:60px;
            -webkit-animation-duration: 1s;
            animation-duration: 1s;
            -webkit-animation-fill-mode: both;
            animation-fill-mode: both;
         }
         @-webkit-keyframes flip {
            0% {
               -webkit-transform: perspective(400px) rotateY(0);
               -webkit-animation-timing-function: ease-out;
            }
            40% {
               -webkit-transform: perspective(400px) translateZ(150px) rotateY(170deg);
               -webkit-animation-timing-function: ease-out;
            }
            50% {
               -webkit-transform: perspective(400px) translateZ(150px) rotateY(190deg) scale(1);
               -webkit-animation-timing-function: ease-in;
            }
            80% {
               -webkit-transform: perspective(400px) rotateY(360deg) scale(.95);
               -webkit-animation-timing-function: ease-in;
            }
            100% {
               -webkit-transform: perspective(400px) scale(1);
               -webkit-animation-timing-function: ease-in;
            }
         }
         
         @keyframes flip {
            0% {
               transform: perspective(400px) rotateY(0);
               animation-timing-function: ease-out;
            }
            40% {
               transform: perspective(400px) translateZ(150px) rotateY(170deg);
               animation-timing-function: ease-out;
            }
            50% {
               transform: perspective(400px) translateZ(150px) rotateY(190deg) scale(1);
               animation-timing-function: ease-in;
            }
            80% {
               transform: perspective(400px) rotateY(360deg) scale(.95);
               animation-timing-function: ease-in;
            }
            100% {
               transform: perspective(400px) scale(1);
               animation-timing-function: ease-in;
            }
         }
         .flip {
            -webkit-backface-visibility: visible !important;
            -webkit-animation-name: flip;
            backface-visibility: visible !important;
            animation-name: flip;
         }
      </style>
   </head>
   
   <body>
      <div id = "animated-example" class = "animated flip"></div>
      <button onclick = "myFunction()">Reload page</button>
      
      <script>
        function myFunction() {
            location.reload();
        }
      </script>
   </body>
</html>

1 2 3 4 5 6 7 ... 1220 Next
Advertisements
Loading...