Your ultimate guide in programming...

  • Infix to Postfix Converstion

    * C++ implementation to convert infix expression to postfix*

  • DOUBLY QUEUE IMPLEMENTATION C++

    Double Queue Implemention Guide.

  • Data Structures in JavaScript

    As business logic moves from the back to the front, expertise in front-end engineering becomes even more important. As for front-end engineers, we rely on viable libraries to be effective.

  • Coding Problem To Solve Exercise 1

    here is Some Coding Problem For Beginners To Boost up their Confidence and to get grip on programming. This problem is for beginner levels for their brainstorming.

  • Coding Problem To Solve Exercise 2

    here is Some Coding Problem For Beginners To Boost up their Confidence and to get grip on programming. This problem is for beginner levels for their brainstorming.

  • Coding Problem To Solve Exercise 3

    * here is Some Coding Problem For Beginners To Boost up their Confidence and to get grip on programming. This problem is for beginner levels for their brainstorming.*

Coding Problem To Solve Exercise 2



Coding Problem To Solve Exercise 2


        Here is Some Coding Problem For Beginners To Boost up their Confidence and to get grip on programming. This problem is for beginner levels for their brainstorming. 


Note: When you are done with a question then post your answer this will be good for others to start and for your to correct your mistakes. 



Let's Get Start Your Solving Problem Journey with programminginterest1


    1. Write a program that obtains marks in the entry test. If obtained marks are greater than 80 then display “You can get admission is Fast” otherwise “Sorry you did not get admission. Please try next time”

 Note: Use if-else without curly brackets. 

    2. Write a program that obtains a temperature in degrees Fahrenheit from the user. If the temperature is 80 degrees or more, displays a message that says, “Weather is perfect for playing cricket " otherwise displays a message stating "Don’t go outside, the weather is too cold”. 

Note: Use if-else without curly brackets. 

    3. Suppose there is a cricket match between Pakistan and India. India played first and gave a target of 300 runs to Pakistan. Now write a program that obtains a cricket match score and remaining wickets from the user. If the user is greater than 300 outputs a message indicating “Pakistan win the match by X wickets” while X is remaining wickets. Otherwise shows a message of how many remaining runs required to win with X wickets in hand. Use a single if-else statement. If the score is 300 with 0 wickets in hand then the display match is drawn. 

Note: Score and wickets are not less than zero 

    4. Write a program that obtains a name and age from the user. If the user is 18 or older, outputs a message indicating they are old enough to drive with a username. For people under 18, outputs a message indicating how many years they must wait before they can drive legally with a username. Use a single if-else statement.

    5. Write a program that inputs a mark out of 100 from the user and displays his/her grades. a. If marks are greater than 80 display “You got A grade” b. If marks are greater than 50 display “You got B grade” c. If marks are greater than 40 display “You got C grade” d. If marks are below 40 display “You got F grade”

Note: Number must be 1 to 100 otherwise display invalid number. 

    6. Write a program that inputs a number from the user from 1 to 7 and displays the name of the weekday. Such as Enter number: 1 Its Tuesday Note: Number must be 1 to 7 otherwise display invalid number. 

    7. The following program contains errors. Correct them so that the program will run and mention reason of error if any.




Share:

Newest Post

Coding Problem To Solve Exercise 3

                   Coding Problem To Solve Exercise 3 Objectives: Practice and understanding of basic c++ programs Control Structure(repetit...

Popular Posts

Recent Posts