Posts

Showing posts with the label Random

Random Joke Generator HTML with Javascript

Image
Joke Generator Random Joke Generator New Joke Source Code <!DOCTYPE html> <html>     <head>         <title>Joke Generator</title>     </head>     <body>     <body bgcolor="lightgreen"></body>        <h1>Random Joke Generator</h1>        <div><span style="font-size:25px">        <div id="jokeDisplay"></div>        <button onclick= "newJoke()">New Joke</button>        <script scr="javascript.js"></script>     </body> <script> var jokes= ['Guess the number of programmers it takes to change a light bulb? Zero its a hardware problem','There are only 10 kinds of people in this world: those who know binary and ...

Java Random Numbers

Image
This simple Program will output Random Numbers using Java Java import java.util.*;  class RandomNumbers {  public static void main(String[] args) {  int counter;  Random nums = new Random();  System.out.println("Random Numbers:"); for (counter = 1; counter <= 5; counter++) {    System.out.println(nums.nextInt(100)); } } } Click here to see this code run More Free Code Examples: Java Code to Reverse a String Java Current Time and Date Program Javascript Easy Battleship Game

Random Animal Generator Tutorial

Image
Random Animals Generator Tutorial using HTML5, CSS, and JavaScript      Today we will build an awesome beginner code to create a Random Animals Generator. We start by telling the computer we are using HTML <!DOCTYPE html> Next we place our opening HTML tag <html> This is our head tag where we place the title     <head>     This is our opening and closing title tags it will not be seen on the run screen like our Tags will not show up when ran         <title>Random Animals</title>         This is our closing head tag     </head>     This is our opening body tag this begins the portion that will be seen on the Run Screen       <body> This is our introduction we are using the H1 or largest header tag. The text placed betw...