[go: up one dir, main page]

0% found this document useful (0 votes)
3 views2 pages

70 Basic Csharp Qn

The document lists various basic programming tasks categorized into sections such as Basic Input/Output Programs, Conditional Statements, Loops, Arrays and Strings, Functions and Recursion, Sorting and Searching, and Mathematical Programs. Each section contains specific tasks that can be implemented in programming languages like Java. The document concludes by offering assistance for solutions to these tasks.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

70 Basic Csharp Qn

The document lists various basic programming tasks categorized into sections such as Basic Input/Output Programs, Conditional Statements, Loops, Arrays and Strings, Functions and Recursion, Sorting and Searching, and Mathematical Programs. Each section contains specific tasks that can be implemented in programming languages like Java. The document concludes by offering assistance for solutions to these tasks.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Basic Input/Output Programs

1. Print "Hello, World!"


2. Print your name
3. Print the sum of two numbers
4. Print the product of two numbers
5. Swap two numbers without a third variable
6. Convert Celsius to Fahrenheit
7. Convert kilometers to miles
8. Find the ASCII value of a character
9. Find the square and cube of a number
10. Check if a number is even or odd
Conditional Statements
11. Find the largest of two numbers
12. Find the largest of three numbers
13. Check if a number is positive, negative, or zero
14. Check if a number is a multiple of 5
15. Check if a character is a vowel or consonant
16. Check if a character is uppercase or lowercase
17. Find the grade of a student based on marks
18. Check if a year is a leap year
19. Check if three sides form a valid triangle
20. Find the type of triangle (equilateral, isosceles, scalene)
Loops (for, while, do-while)
21. Print numbers from 1 to 10
22. Print numbers from N to 1
23. Print even numbers from 1 to N
24. Print odd numbers from 1 to N
25. Print the sum of the first N natural numbers
26. Print the factorial of a number
27. Print the Fibonacci series up to N terms
28. Reverse a number
29. Count the number of digits in a number
30. Find the sum of digits of a number
Arrays and Strings
31. Find the largest element in an array
32. Find the smallest element in an array
33. Reverse an array
34. Find the sum of elements in an array
35. Find the average of numbers in an array
36. Check if a string is a palindrome
37. Count vowels and consonants in a string
38. Convert a string to uppercase
39. Convert a string to lowercase
40. Find the frequency of a character in a string
Functions and Recursion
41. Write a function to find the factorial of a number
42. Write a function to find the GCD of two numbers
43. Write a function to find the LCM of two numbers
44. Write a recursive function for the Fibonacci series
45. Write a recursive function to reverse a string
46. Write a function to check if a number is prime
47. Write a function to check if a number is Armstrong
48. Write a function to find the power of a number
49. Write a function to swap two numbers using call by reference
50. Write a function to count the number of words in a string

Sorting and Searching


51. Implement Bubble Sort
52. Implement Selection Sort
53. Implement Insertion Sort
54. Implement Linear Search
55. Implement Binary Search
56. Sort an array in descending order
57. Find the second largest number in an array
58. Find the second smallest number in an array
59. Merge two sorted arrays
60. Find the intersection of two arrays
Mathematical Programs
61. Find the sum of all prime numbers between 1 to N
62. Find the sum of all even numbers in an array
63. Find the sum of all odd numbers in an array
64. Convert a decimal number to binary
65. Convert a binary number to decimal
66. Check if a number is a perfect square
67. Find the HCF (GCD) and LCM of two numbers
68. Find the sum of squares of first N natural numbers
69. Check if a number is a palindrome
70. Find the sum of the series 1 + 1/2 + 1/3 + ... + 1/N
Would you like solutions for any of these in Java?

You might also like