all questions of black beauty

17
Question: Write a program to compute and display the roots of the quadratic equation of the form ax2+bx+c.If b 2 -4ac gives a negative result, print IMAGINARY ROOTS. If b 2 -4ac gives a positive result, print REAL AND DISTINCT ROOTS. Root1= (-b+√b 2 -4ac)/2a Root2= (-b-√b 2 -4ac)/2a If b 2 -4ac gives a positive result, print EQUAL ROOTS. Root= -b/2a

Upload: sourodipkundu

Post on 15-Nov-2015

219 views

Category:

Documents


2 download

DESCRIPTION

Black Beauty the evergreen story of the black horse and its adventures

TRANSCRIPT

  • Question:

    Write a program to compute and display the roots of the

    quadratic equation of the form ax2+bx+c.If b2-4ac gives a

    negative result, print IMAGINARY ROOTS.

    If b2-4ac gives a positive result, print REAL AND DISTINCT

    ROOTS.

    Root1= (-b+b2-4ac)/2a

    Root2= (-b-b2-4ac)/2a

    If b2-4ac gives a positive result, print EQUAL ROOTS.

    Root= -b/2a

  • Question:

    Write a program that will allow the user to enter a sentence.

    Print each word with alphabets in the reverse words with

    alphabets in reversed order without changing the order of

    the words.

    Replace each word with its ASCII and print.

    Replace each ASCII by reversing the digits.

  • Question:

    WAP to input a sentence that should terminate with either

    (.)/(?)/(!) . Any other input is invalid and re-input will have to

    be taken. Count the number of words and print

    i. The longest word.

    ii. Average length of words.

    iii. Any word or words whose length is equal to the average

    length.

  • Question:

    Write a program that will accept two objects of time and

    print their sum.

  • Question:

    A message has been encoded by reversing it and replacing

    each character by the reverse of the ASCII character. Input

    the code and print the decoded message.

  • Question:

    Design a code in Java to enter a sentence and an integer. The

    message should be encoded by replacing each alphabet with

    the alphabet that comes n places away from it in a circular

    motion.

  • Question:

    Store the rainfall in Kolkata, 2013 over twelve months.

    Arrange them in descending order and print in column

    format.

  • Question:

    Write a program that will allow the user to store data in a 4x4

    integer array. Display the following after required processing-

    a. The array in format.

    b. Sum of each row.

    c. Sum of each column.

    d. Sum of principal diagonal.

    e. Sum of reverse diagonal.

  • Question:

    Write a program to enter a matrix. Transpose the matrix and

    print-

    1. The original matrix.

    2. The transposed matrix.

  • Question:

    Write a program to enter two matrices and find their product

    and print it.

  • Question:

    Write a program in Java that will allow the user to enter data

    in a 2D square array that may store minimum 16 integers and

    maximum 36 integers. Find and print the following:

    a) Identify the smallest and the largest element in the

    matrix and the location.

    b) Identify the element which is largest in the row but

    lowest in the column and print its location; if no such

    element is found, print-NO SUCH ELEMENT.

  • Question:

    Write a program to store the marks scored in physics,

    chemistry, maths, biology by 50 students in the class Mark.txt

  • Question:

    Write a program to use data from file personal.txt containing

    name and basic pay of employees. Generate and print salary

    slip of each employee for number of days he had worked in

    the month.

  • Question:

    Update the number of employees by removing the names of

    those who have retired from Retire.txt

  • Question:

    Create Mark.txt and write the name, roll number and marks

    to the file.

  • Question:

    Read the binary file and calculate the grade. Then print the

    name, roll number, mark and grade.

  • Question:

    Arrange the elements of the array according to descending

    order without using any sorting technique.