473,473 Members | 1,899 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

reading multiple input from the user

65 New Member
i want to get some values from the user and process them.
e.g)
enter three numbers: 1 10.5 50
result is 61.5

is it possible to get these three double values from the user without
using string tokenizer?
(and also without processing the string char by char)

can i get these inputs from the user using readDouble or something?
i am looking for a way like scanf of c programming.
(e.g scanf("%f%f%f",&val1,&val2,&val3); )
Aug 21 '07 #1
2 1923
r035198x
13,262 MVP
i want to get some values from the user and process them.
e.g)
enter three numbers: 1 10.5 50
result is 61.5

is it possible to get these three double values from the user without
using string tokenizer?
(and also without processing the string char by char)

can i get these inputs from the user using readDouble or something?
i am looking for a way like scanf of c programming.
(e.g scanf("%f%f%f",&val1,&val2,&val3); )
java.util.Scanner is your friend here. See the specs page for it.
Aug 21 '07 #2
gaya3
184 New Member
i want to get some values from the user and process them.
e.g)
enter three numbers: 1 10.5 50
result is 61.5

is it possible to get these three double values from the user without
using string tokenizer?
(and also without processing the string char by char)

can i get these inputs from the user using readDouble or something?
i am looking for a way like scanf of c programming.
(e.g scanf("%f%f%f",&val1,&val2,&val3); )
Hi,
I think following code may help u....

<Removed>
Aug 27 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Marc | last post by:
Hello, I have a question about how PHP handles multiple file reads/ writes. I made a page containing a self-submitting form where the user can type his name, topic and a text. When he submits the...
2
by: Jeff | last post by:
I'm trying to create a dynamic form that can have multiple groups of radio buttons (each group has two buttons) with the same name. Essentially, the form allows a user to enter as many names as...
2
by: Jeff | last post by:
I'm trying to create a dynamic form that can have multiple groups of radio buttons (each group has two buttons) with the same name. Essentially, the form allows a user to enter as many names as...
2
by: murraymiken | last post by:
I'm looking to have multiple multiple-select-boxes on a page. But I can only get the contents from the last selected value within a box, via PHP. I've tried numerous methods. What am I doing...
0
by: Craftkiller | last post by:
=========Program compiles on both windows and linux=========== Greetings, I am currently working on an encrpytion program that will take a file and a password string and flip the bits based on the...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.