0% found this document useful (0 votes)
15 views6 pages

Assignment 2template

Uploaded by

dinesganeshan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views6 pages

Assignment 2template

Uploaded by

dinesganeshan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Name :

Roll No:
1. Print the text “Hello World" twice
Program Output

2. Take two numbers and print the outputs following operations a+b, a-b, a*b, a/b, a%b, a++,
a--
Program Output

3. Print the sum of n natural numbers


Program Output
4. Take a number and classify it as positive, or negative.
Program Output

5. Take a character and compare it to find whether vowels are present or absent.
Program Output
6. Print numbers 1-10 in ascending and descending order using loop statements.
Program Output

7. Take the input of two numbers, and find the sum of the squares and the sum of their cubes.
Program Output
8. To find the largest of four numbers.
Program Output

9. Take the coefficients of the quadratic equations of the form ax2 + bx + c = 0 as inputs, and
check whether real roots are possible or not. If possible, find out the roots.
Program Output
10. Print the following pattern.
Program Output

You might also like