answersLogoWhite

0


Best Answer

When writing a program that expects to retrieve data from a user, you have to first know what kind of interface to use. Decide whether you wish to write a console or windowed (graphical) application.

For console applications, you would likely use the scanf() function to retrieve values. See the help system for your compiler or look up "scanf" on the Web for details on using this function.

Graphical applications depend upon the operating system you're using. For instance, under Win32, you have the following options:

- Design a dialog at runtime consisting of STATIC and EDIT controls, plus a BUTTON control for the user to tell your program to commit the data, created with the CreateWindow() or CreateWindowEx() functions;

- If you're using an IDE (i.e. VC), it probably came with a resource editor you can use to create a dialog that contains labels and edit controls.

If you're brave enough to attempt some X11 coding, you'll need to decide which window manager you're using, and read up on the API for that WM to know which functions you have at your disposal.

You will also need to store this data in variables and then act on those variables as desired.

User Avatar

Wiki User

11y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

13y ago

Write a program that asks the user to enter five numbers.Use a floating point data type to hold the numbers.The program should create a file and save all five numbers to the file.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a C plus plus program that asks the user to enter five numbers?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Write various ways to implement stack data structure?

2. Write a program using switch statement that reads a character representing a geometrical figure, then asks the user to enter the required data (ex. Radius for a circle, length and height for a rectangle, etc. ...) . The program should then print the area and circumference.Figures are: circle(c), square(s), rectangle(r), triangle (t).


How do you write a program that asks the user to enter their favouite tv programme and display the result 15 times?

#include <iostream> #include <string> using std::cin; using std::cout; using std::endl; using std::string; int main() { cout << "Enter name of your favorite TV show: \n"; string tvShow = ""; cin >> tvShow; for (int i = 0; i < 15; i++) { cout << endl << tvShow; } cout << endl << endl; system("PAUSE"); return 0; }


Write a program to find the average of three numbers?

#incude<iostream.h> #include<conio.h> void main() { clrscr(); int a,b,c,d,avg; cout<<"enter s numbers"; cin>>a>>b>>c>>d; d=a+b; avg=d\3; cout<<"the average is"<<s; getch(); }


Can a programmer change a code line and make it a new program?

Yes. I can write a python program that asks for your name and then prints "Hi, name, good to meet you." by writing the following program.#!/usr/bin/pythonname = input("What is your name? ")print("Hi", name + "," , "good to meet you.")If I change the third line toprint("Hi", name + ",", "good to meet you. Your name is", len(name), "letters long.")It will say "Hi name, good to meet you. Your name is xletters long.", thus making it a different program.


A c program to convert decimal number to decimal number?

The question asks to do nothing by converting a decimal into itself. Perhaps the question was mistyped. Please restate the question.

Related questions

Write a program in php that asks the user to enter a distance in kilometers, then convert that distance to miles. The conversion formula is as follows: Miles = Kilometers x 0,6214?

answer:


How do I write an application that asks the user to enter two integers obtains them from the user and displays the larger number followed by the words is larger?

write an application that asks the user to enter two integers obtains them from the user in java


Write various ways to implement stack data structure?

2. Write a program using switch statement that reads a character representing a geometrical figure, then asks the user to enter the required data (ex. Radius for a circle, length and height for a rectangle, etc. ...) . The program should then print the area and circumference.Figures are: circle(c), square(s), rectangle(r), triangle (t).


Design a modular program that asks the user to enter a distance in kilometers and then converts that distance to miles The conversion formula is as follows Miles equals Kilometers x 0.6214?

Kilometer Converter Design a modular program that asks the user to enter a distance in kilometers, and then converts that distance to milies. The conversion formula is as follows: Miles= Kilometers X 0.6214


How does one use a Repayment Mortgage Calculator?

One can use a repayment mortgage calculator online. All you have to do is insert the numbers it asks for and then hit enter to get the calculation on your mortgage.


How do you pass input to an interactive program through an external file in java?

hi i used ProcessBuilder to run the program but i m stuck with how to pass input to the executable. If i run that .exe file in cmd it asks to "enter your choice (1/2/3)" How to pass the choice from my java code?


What is 600k in a frame?

this is the question Emma asks to enter her page and the answer is..... cemetery gates


Where can you find a list of all William-Sonoma store locations in the US including telephone numbers?

See the related link to their web-site. At the bottom of the page - click the 'find a store' link - and enter the information it asks for !


What will you do if someone asks please write anything here?

write the word "anything" to the spot indicated lol


Where do you write the code to get the gift on moshi monsters?

you write it when you login under your password where it asks for a secret code.


How do you enter gift codes for Minecraft PC?

You will need to register first, when it asks how you want to pay it should have an option to enter a gift code.


What does it mean when someone asks you to edit your tags?

This is when a parent or guardian asks you to write your name in the label or "Tag" located inside your clothes.