Write a program that will asks the user for a positive integer input. Print the even numbers between 1 and the inputted number on the screen.

2.2. Write a program that will compute the sum of the first N odd numbers.
Example: If the value of N is 5, then the sum of the first 5 odd numbers is 25, that is, 1 + 3 + 5 + 7 + 9

you seem to be newbie here , so if you are not familiar with daniweb's rules then i will highly recommend you to see rules before posting a question.

while a posting a question , you should also put your efforts so other user here can help as they are here to solve a problem not to do homework or an assignment for you.

so , show us that what efforts did you made to solve the problem , then after we will be there to help you as we can.

hope you understand.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.