Using C language to solve the problem below:

#include<stdio.h>
#include<stdlib.h>
void main()
{
int option;
do
{
printf("\n\n1. Play game \n2. Display score \n3. Deposit funds \n4.
Exit");
printf("\nEnter your option: ");
scanf("%d",&option);
switch(option)
{
case 1: printf("You can play game now");
break;
case 2: printf("Your score");
break;
case 3: printf("Deposit funds");
break;
case 4: exit(0);
break;
default: printf("You entered wrong option. Please enter valid
option");
break;
}
}while(1);
}
Screenshots:


Output:


Using C language to solve the problem below: 3. (5 pts) Construct a do-while () loop,...
In C++ Programming, Try using loops only. This lab demonstrates the use of the While Loop and the Do While Loop as error checking mechanisms. You will be using each of these loops to solve the same problem. Please put them both in the same program. When you test the code, you will not see a difference in the way they execute - but there will be a difference in the logic when writing the code. You will want to...
The purpose of this assignment is to get experience with an
array, do while loop and read and write file operations.
Your goal is to create a program that reads the exam.txt file
with 10 scores. After that, the user can select from a 4 choice
menu that handles the user’s choices as described in the details
below. The program should display the menu until the user selects
the menu option quit.
The project requirements:
It is an important part...
java program
QUESTION 2: 1. Write a do-while loop that asks the user to select a task from the following menu to continue: 1. Option 1 2. Option 2 3. Option 3 4. Option 4 5. Exit Read the selection from the keyboard then write the switch statement: For option 1, display the message "Do the option 1" For option 2, display the message "Do the option 2" For option 3, display the message "Do the option 3" For option...
In C language using printf and scanf statements: Write a program to display a histogram based on a number entered by the user. A histogram is a graphical representation of a number (in our case, using the asterisk character). On the same line after displaying the histogram, display the number. The entire program will repeat until the user enters zero or a negative number. Before the program ends, display "Bye...". The program will ask the user to enter a non-zero...
This should be programmed in C LANGUAGE! This lab requires you to use arrays, loop structures and if statements/switch statements. You must use functions where indicated. Test your program often - make sure each bit of functionality works before you continue. In this problem, we want to create a song and play it as we build it. The way we do this is by using arrays to store different notes. Notes are just tones that run for a specific amount...
Topics c++ Do While loops cin.ignore Description Redo the last assignment with the following modifications: 1. When the program asks the user to enter a student name, the user will enter the full name (e.g. John Smith). Make changes to the program to accommodate that. 2. When the program asks the user to enter the test score, the user will enter the test score as before. However, make changes to the program so that it will check that the score...
in c++ language 1.Re-write the following for loop statement by using a while loop statement: int sum = 0; for(int i=0;i<=1000;i++){ sum+=i; } 1 (b). Following is the main () function of a program. The program asks a user to enter 150 integers and print the largest integer user entered. int main() { int score, highest; //missing portion of the program return 0; } 1(c). Find the missing portion of the following code, so the...
C++ Program Write a do-while loop that continues to prompt a user to enter a number less than 100, until the entered number is actually less than 100. End each prompt with a newline. Ex: For the user input 123, 395, 25, the expected output is: Enter a number (<100): Enter a number (<100): Enter a number (<100): Your number < 100 is: 25 #include <iostream> using namespace std; int main() { int userInput; /* Your solution goes here */...
C LANGUAGE. PLEASE INCLUDE COMMENTS :)
>>>>TheCafe V2.c<<<<
#include <stdio.h>
int main()
{
int fries; // A flag denoting whether they want fries or not.
char bacon; // A character for storing their bacon preference.
double cost = 0.0; // The total cost of their meal, initialized to start at 0.0
int choice; // A variable new to version 2, choice is an int that will store the
// user's menu choice. It will also serve as our loop control...
1. Create a String variable named menuChoice. 2. Display 3 options for your program. I recommend using 3 System.out.println statements and a 4th System.out.print to show "Enter your Selection:". This needs to be inside the do -- while loop. A. Deposit Cash. B. Withdraw Cash X. Exit Enter your Selection: 3. Prompt for the value menuChoice. 4. If menuChoice is "A", display "Do Deposit" and redisplay the menu. If menuChoice is "B", display "Do withdrawal" and redisplay the menu. If...