Write a program to scan a number n and then output the sum of the powers from 1 to n. Thus, if the input is 4, the output should be 288 because: 11 + 22 + 33 + 44 1 + 4 + 27 + 256 = 288
1st Solution – using for loop/ 2nd Solution – using while loop 3rd Solution- using do while loop
Write a program using two-dimensional arrays that lists the Odd numbers and Even numbers separately in a given 12 input values.
Sample input/out dialogue:
Enter twelve numbers: 15 20 13 35 40 16 18 20 18 20 19
Odd numbers are: 15 13 35 19
Even numbers are: 40 16 18 20 18 20
Write a program that reads in a month of the year as a number (eg 1 for January, 4 for April) and then displays the number of days in that month. Keep in mind the impact of leap years. Note – Only for February the actual year is important (you should ask the user for the year of interest)
Write a program that first requests from the user how many integers will be entered. It then reads
in those integers and calculates and displays the average of the numbers (to the nearest 2
decimal points). It must cater for a scenario where the user enters 0 numbers.
Write a program which requests a number between 1 and 50 from the user. It must repeatedly ask
the user for a number until a valid number is entered.
After receiving a valid number, the program must display all the even numbers smaller than that
number. (If the user enters 11, the numbers 2,4,6,8,10 must be displayed)
Write a program that does the following for 15 students:
Reads in 3 marks for each student (marks must be between 0 and 100)
Calculates and displays the highest mark for each student.
Finds the highest mark for all students
Develop a Console Application to maintain the Contact details of Guests staying at Guest House. Use Layering concept. The class Diagram (The faculty will share the copy of the class Diagram)
Validations :
• All fields compulsory
• guestID should be 3 digits long
• guestName can accept alphabets only. It should start with Capital Alphabet and should have minimum 3 characters
• contactNumber should have 10 digits exctly. It should start with 6 or 7 or 8 or 9.
Create the array of suppliers and store this collection of suppliers in JSON object using JSON Serialization
Create a Student class with fields RollNo, Name, City, Degree. Implement the ISerializable interface in Student class. And perform binary serialization on the Student Object
Implement your own version of the hash table using C# with mentioned functionalities: insert, delete, contains, get blue by key, size, iterator, traverse/print.
Use of similar data structures already present in the language/framework is not allowed.