0 Bewertungen0% fanden dieses Dokument nützlich (0 Abstimmungen)
11 Ansichten2 Seiten
Given 3 sides of a triangle, find area. Check whether it is an equilateral or isosceles or scalene triangle. Write a program to check whether a given year is leap year or not.
Given 3 sides of a triangle, find area. Check whether it is an equilateral or isosceles or scalene triangle. Write a program to check whether a given year is leap year or not.
Copyright:
Attribution Non-Commercial (BY-NC)
Verfügbare Formate
Als TXT, PDF, TXT herunterladen oder online auf Scribd lesen
Given 3 sides of a triangle, find area. Check whether it is an equilateral or isosceles or scalene triangle. Write a program to check whether a given year is leap year or not.
Copyright:
Attribution Non-Commercial (BY-NC)
Verfügbare Formate
Als TXT, PDF, TXT herunterladen oder online auf Scribd lesen
Topics : Scalars, Lists, arrays and Control structures
1. Given 3 sides of a triangle, find area. 2. Given 3 sides of a triangle. Check whether it forms a triangle or not. if it forms a triangle, then check whether it is an equilateral or isosceles or scalene triangle. 3. Write a program to delete a file Input : Filename Output : Error message if no such file exists or delete the file if exists Give error message if deletion fails. Use : if(-e "name") and unlink system call. 4. Given a number, find a. Sum of the digits b. Digital root c. Whether it is a perfect square d. A perfect square > a given number 5. Write a program to find sum and average of numbers till the user says no. 6. Write a program to find all the factors of a given number. 7. Given a number n, a) Find number of factors of each number from 2 to n. b) Find a number which has maxinum number of factors. 8. Write a program to find biggest of n numbers. 9. Check a given number is palindrome or not. 10. Write a program to check for a prime number. 11. Write a program to check whether a given number is armstrong or not. 12. Write a program to generate prime numbers between 2 to n. 13. Write a program to generate all palindrome numbers betweem 100 and 999. 14. Write a program to generate all armstrong numbers between 100 and 999. 15. Generate (Say n = 4) a) 1 + 2 + 3 + 4 = 10 b) 1 = 1 1 + 2 = 3 1 + 2 + 3 = 6 1 + 2 + 3 + 4 = 10 c) 1 = 1 1 + 2 = 3 1 + 2 + 3 = 6 1 + 2 + 3 + 4 = 10 d) 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 16. Write a program to check whether a given year is leap year or not. . 17. Given a Date in the format dd/mm/yyyy or dd-mm-yyyy. a) Validate date b) Find next date c) Find name of the month d) Convert to Julian date 18. Generate prime numbers using sieve method. 19. Solve the prison problem. 20. Read n elements into an array, find a. Sum b. Product c. Mean d. Stddev 21. Use the output of ls -l or dir command for the following a) Display filename and directory names b) count number of files and directories c) Output name and size d) Find total size of the directory e) Find the biggest file f) Output files in the order of size g) Delete files greater than particular size after confirmation from the use r
(Problem Books in Mathematics) Antonio Caminha Muniz Neto - An Excursion Through Elementary Mathematics, Volume III - Discrete Mathematics and Polynomial Algebra (2018, Springer)