Thursday, September 10, 2020

JAVA Program | Get IP Address of Computer System | diploma Computer Engineering |

 

//JAVA Program to Get IP Address of Computer System 

package Diploma;

import java.net.InetAddress;

public class IPA

{

 public static void main(String args[]) throws Exception

 {

      InetAddress addr = InetAddress.getLocalHost();

      System.out.println("Local IP Host Address: "+addr.getHostAddress());

      String hostname = addr.getHostName();

      System.out.println("Local Host name: "+hostname);

 }

}

JAVA Program | Sorting - Ascending & Descending Order of input arrays numbers | Diploma Computer Engineering |

 

//JAVA Program to Perform Sorting - Ascending & Descending Order

package Diploma;

import java.util.Scanner;

public class Sort 

{

    public static void main(String args[])

    {

        int a[]=new int[5];

        int i,j;

        Scanner sc=new Scanner(System.in);

        for(i=0;i<5;i++)

        {

         System.out.println("Enter any Number : ");

         a[i]=sc.nextInt();

        }

        System.out.println("Input Number : ");

        for(i=0;i<5;i++)

        {

          System.out.println(a[i]); 

        }

        

        int t;

        System.out.println("asscending order : ");

        for(i=0;i<5;i++)

        {

            for(j=i+1;j<5;j++)

            {

                if(a[i]<a[j])

                {

                    t=a[i];

                    a[i]=a[j];

                    a[j]=t;

                }

             }

            System.out.println(a[i]);

        }

        

        System.out.println("Deasscending order : ");

        for(i=0;i<5;i++)

        {

            for(j=i+1;j<5;j++)

            {

                if(a[i]<a[j])

                {

                    t=a[i];

                    a[i]=a[j];

                    a[j]=t;

                }

             }

            System.out.println(a[i]);

        }

     

    }

}

JAVA Program | HCF & LCM of two Numbers | Diploma Computer Engineering |

 

//JAVA Program to find HCF & LCM of two numbers

package Diploma;

import java.util.Scanner;

public class HCFLCM 

{

   public static void main(String args[]){

      int temp1, temp2, num1, num2, temp, hcf, lcm;

      Scanner scanner = new Scanner(System.in);


      System.out.print("Enter First Number: ");

      num1 = scanner.nextInt();

      System.out.print("Enter Second Number: ");

      num2 = scanner.nextInt();

      scanner.close();


      temp1 = num1;

      temp2 = num2;


      while(temp2 != 0)

      {

         temp = temp2;

         temp2 = temp1%temp2;

         temp1 = temp;

        }

      hcf = temp1;

      lcm = (num1*num2)/hcf;

      System.out.println("HCF = "+hcf);

      System.out.println("LCM = "+lcm);

   }

}    


JAVA Program | HCF of two Numbers | Diploma Computer Engineering |

 

//JAVA Program to find HCF of two numbers

package Diploma;

import java.util.Scanner;

public class HCF1 

{

public static void main(String args[]){

      int a, b, i, hcf = 0;

      Scanner sc = new Scanner(System.in);

      System.out.println("Enter first number :: ");

      a = sc.nextInt();

      System.out.println("Enter second number :: ");

      b = sc.nextInt();


      for(i = 1; i <= a && i <= b; i++) 

      {

         if( a%i == 0 && b%i == 0 )

         hcf = i;

      }

      System.out.println("HCF of given two numbers = "+hcf);    

}

}

JAVA Program | GCD of two numbers | Diploma Computer Engineering

 

Greatest Common Divisor: It is the highest number that completely divides two or more numbers. It is abbreviated for GCD. It is also known as the Greatest Common Factor (GCF) and the Highest Common Factor (HCF).

Example: Find the GCF of 12 and

Solution:

Factors of 12: 1, 2, 3, 4, 6, 12

Factors of 8: 1, 2, 4, 8

Common Factors: 1, 2, 4

Greatest Common Factor: 4

Hence, the GCF of 12 and 8 is 4.

//JAVA Program to ind GCD of two numbers

package Diploma;

import java.util.Scanner;

public class GCD 

{

    public static void main(String args[])

    {

      int x, y, i, gcd = 0;

      Scanner sc = new Scanner(System.in);

      System.out.println("Enter first number :: ");

      x = sc.nextInt();

      System.out.println("Enter second number :: ");

      y = sc.nextInt();

    for(i = 1; i <= x && i <= y; i++)  

    {  

        if(x%i==0 && y%i==0)  

        gcd = i;  

    }  

    System.out.println("GCD = "+gcd);  

}   

}


Tuesday, September 8, 2020

Class-07 | Computer Technology | Chapter - 3 | MS PowerPoint 2010

 

Class-07 | Computer Technology | Chapter - 3 | MS PowerPoint 2010

Answer the Following questions | By : Ashok Roshan

Q1. What is MS Power point 2010?

Ans:  MS PowerPoint is a powerful presentation making software. It help to present information in an effective and interesting way.

 

Q2. Define Presentation and Slide.

Ans:  Presentation means to presents (Slide Show) the slide of PowerPoint file.

A presentation file made up by many electronic pages are called slide.

 

Q3. What is Design Template? How will you apply the design template to the presentation? Ans:  Design Template is set of predefined formats and colour schemes that can be applied the background of a presentation.

 

Q4. What is Transition? Write the steps to apply transition effect to the slides.

Ans:  Transition is a Special effect added to the slides initially appearance on screen.

The following steps apply transition effect to the slides

Step1:- Select the transition effect from the Transition tab.

Step2:-Click on apply to all slides from the timing group.

Step3:- to add different transitions between slides, select individual slides and choose transition option.

 

Q5. What is Animations in Power point?

Ans:  Animation are the special sound or visual effects that can be added to a title, bulleted points or an object such as chart or picture on a slide.

 


Class- 5 | Computer Technology | Chapter – 3 | Formatting in MS Word

 

Class- 5 | Computer Technology | Chapter – 3 | Formatting in MS Word

Exercise Solutions | By: - Ashok Sir

 

A.Oral Questions

1. How many alignment options are there in MS Word?

Ans: There are four alignment options (Left, Right, Center, Justify) in MS Word.

 

2. What do you mean by line spacing?

Ans: Line Spacing means to give space between the lines in the paragraph.

 

3. What is sorting?

Ans: Sorting means to arrange the list items in ascending or descending order.

 

4. What is the shortcut key for justifying text?

Ans: Ctrl + J.

 

F.Answer the following questions:

1. What do you mean by Formatting?

Ans: Formatting means changing the appearance of the text in a document.

2. Define Paragraph alignment.

Ans: Paragraph formatting can be done using paragraph group in the Home tab.

3. What is the use of Border and shading?

Ans: Border and Shading can be done on paragraph or the complete page.

4. When Indention is used?

Ans: Indention is used to determine the distance of the paragraph from either the left or right margin.

5. What is the use of Sorting?

Ans: Sorting means to arrange the list items in ascending or descending order.

 


CMS - 2024 || JAC INTERMEDIATE EXAMINATION - 2024 || 12th COMPUTER SCIENCE!

  Part-A Multiple Choice Questions 1) Who is the developer C++? a) Von Neumann b) Dennis M. Ritchie c) Charles Babbage d) Bjarne Stroustrup ...