Knowledge in Fun

Java print command line arguments

class Arguments {   public static void main(String[] args) {     for (String t: args) {       System.out.println(t);     }   } }

Java program to print alphabets

class Alphabets {    public static void main(String args[])    {       char ch;       for (ch = 'a'; ch <= 'z'; ch++)          System.out.println(ch);    } }

Java program to print multiplication table

import java.util.Scanner; class MultiplicationTable {   public static void main(String args[])   {     int n, c;     System.out.println("Enter an integer to print it's multiplication table");     Scanner in = new Scanner(System.in);     n = in.nextInt();     System.out.println("Multiplication table of " + n);     for (c = 1; c <= 10; c++)       System.out.println(n + "*" + c + " = " + (n*c));   } }

Java program to print the largest of the 3 numbers

import java.util.Scanner; class Largest {   public static void main(String args[])   {     int x, y, z;     System.out.println("Enter three integers");     Scanner in = new Scanner(System.in);     x = in.nextInt();     y = in.nextInt();     z = in.nextInt();     if (x > y && x > z)       System.out.println("First number is largest.");     else if (y > x && y > z)       System.out.println("Second number is largest.");     else if (z > x && z > y)       System.out.println("Third number is largest.");     else       System.out.println("The numbers are not distinct.");   } }

Java program to reverse string

import java.util.*; class ReverseString {    public static void main(String args[])    {       String original, reverse = "";       Scanner in = new Scanner(System.in);             System.out.println("Enter a string to reverse");       original = in.nextLine();             int length = original.length();             for (int i = length - 1 ; i >= 0 ; i--)          reverse = reverse + original.charAt(i);                 System.out.println("Reverse of the string: " + reverse);    }

Java program to get IP Addresses

import java.net.InetAddress; class IPAddress {   public static void main(String args[]) throws Exception   {     System.out.println(InetAddress.getLocalHost());   } }

Binary search in Java

import java.util.Scanner; class BinarySearch {   public static void main(String args[])   {     int c, first, last, middle, n, search, array[];     Scanner in = new Scanner(System.in);     System.out.println("Enter number of elements");     n = in.nextInt();     array = new int[n];     System.out.println("Enter " + n + " integers");     for (c = 0; c < n; c++)       array[c] = in.nextInt();     System.out.println("Enter value to find");     search = in.nextInt();     first  = 0;     last   = n - 1;     middle = (first + last)/2;     while( first <= last )     {       if ( array[middle] < search )         first = middle + 1;           else if ( array[middle] == search )       {         System.out.println(search + " found at location " + (middle + 1) + ".");         break;       }       else          last = middle - 1;       middle = (first + last)/2;    }    if (first > last)       System.out.println(search + " isn't present in the list.\n");   } }

Fun fact part 1

This pdf file contents information of fun facts...

Fun fact part 2

This pdf file contents information of fun fact.this is part 2...

FUNDAMENTAL OF COMPUTERS (INPUT DEVICES) (First semester notes) Chapter-1 (Part-1) Makhanlal chaturvedi national University,Bhopal

(Part-1)IN This, There is a chapter first of COMPUTER FUNDAMENTAL Subject Part-1 named INTRODUCTION OF COMPUTER Makhanlal Chaturvedi national journalism and communication University, Bhopal. There is a very important note oF Fundamental computers For BCA first semester Students. Share with your friends and help them to learn Fundamental of Computers. There are Five subjects in BCA first semester .

TYPE OF COMPUTER (First semester notes) Chapter-1 (Part-7) Makhanlal chaturvedi national University,Bhopal

(Part-7) IN This, There is a chapter first of COMPUTER FUNDAMENTAL Subject Part-7 named INTRODUCTION OF COMPUTER Makhanlal Chaturvedi national journalism and communication University, Bhopal. There is a very important note oF Fundamental computers For BCA first semester Students. Share with your friends and help them to learn Fundamental of Computers. There are Five subjects in BCA first semester .

functtions in c for progg

This presentation is prepared by faculty of sreenidhi. It helps to have a better glance of important topics before any competitive exams. It gives us vivid knowledge in different areas. These presentations give better and clear understanding for topics mentioned. These presentations help students to prepare for competitive exams and also to have a quick glance for topics mentioned.