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.
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.
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).
#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; }
#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(); }
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.
The question asks to do nothing by converting a decimal into itself. Perhaps the question was mistyped. Please restate the question.
answer:
write an application that asks the user to enter two integers obtains them from the user in java
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).
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
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.
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?
this is the question Emma asks to enter her page and the answer is..... cemetery gates
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 !
write the word "anything" to the spot indicated lol
you write it when you login under your password where it asks for a secret code.
You will need to register first, when it asks how you want to pay it should have an option to enter a gift code.
This is when a parent or guardian asks you to write your name in the label or "Tag" located inside your clothes.