answersLogoWhite

0

f(x)=2x+2. Put in 0, 1/2, 1, 3/2, 2... and you will get integer values. That is for the domain. The numbers you get when you put that in are the range integral values.

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

How do you write a program that takes a list of all positive integers from input and counts as the integers are input?

// create an BufferedReader from the standard input stream BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String currentLine = ""; int total = 0; // read integers System.out.print("Input an integer: "); while (!(currentLine = in.readLine()).equals("")) { int input = 0; try { input = Integer.valueOf(currentLine); total += input; } catch (final NumberFormatException ex) { System.out.println("That was not an integer."); } System.out.print("Input an integer: "); }


Write a line of code that asks the python user to input an integer greater than 0 and store this value in a variable and display its value?

integer = input("Please input an integer greater than 0: ") print(integer)


How do you write a program that accepts 50 integer values and sort them in basic programming?

Create an array with 50 elements and input the integers one a time, filling the array. Use an insertion sort on the array for each input except the first. Alternatively, input the values first and then use insertion sort.


What is a mapping or pairing of input values with output values?

A relation is a mapping or pairing of input values with output values.


Which scanner class method would you use to read integer as input?

The method Scanner.nextInt() returns an integer obtained as user input.


Q' is connected to J input and K equals 1 If clock signal is successively applied 6 times what is output sequence?

010101


Input values for a function is called?

The Input or X values are called the Domain.


Is there a way to create variables as needed in C based on user input?

Yes. You can store any number of values input at runtime using a variable-length array or any other sequence container such as a list.


How to write a C plus plus Program to convert a string into an integer?

std::string input = ""; std::getline (std::cin, input); // get input from stdin std::stringstream ss (input); // place input in a string stream integer num = 0; if (ss >> num) // extract integer from string stream { // Success! } else { // Fail! }


Collection of all input values?

A collection of all input values is called 'Data'.


Write a program that takes 5 numbers 1 to 10 from user and then prints the number of distinct values?

The simplest solution is to use a std::set<size_t> sequence container to store the values as they are input. Duplicate entries are ignored automatically, thus when all 5 numbers have been input, the set will have at least 1 number but no more than 5. Thus the size of the set represents the count of distinct values that were input.


How do you accept an integer or a float or double value as a console input from user in java also you do want to use command line arguments?

This code block will accept input from standard input (console). It will first read in integers until you enter an empty string (just hit enter). Then it will do the same with floats and then with doubles. If you give it bad input, then it will tell you about it and just continue reading in numbers. Note that I didn't touch the command line here, but the process to parse an argument sent in from the command line is the same as below. Just use the try-catch block with args[n] (in place of currentLine) to parse the nth argument. // create an BufferedReader from the standard input stream BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String currentLine = ""; // read integers System.out.print("Input an integer: "); while (!(currentLine = in.readLine()).equals("")) { int input = 0; try { input = Integer.parseInt(currentLine); } catch (final NumberFormatException ex) { System.out.println("That was not an integer."); } System.out.println("\tInteger read: " + input); System.out.print("Input an integer: "); } // read floats System.out.print("Input an float: "); while (!(currentLine = in.readLine()).equals("")) { float input = 0.0f; try { input = Float.parseFloat(currentLine); } catch (final NumberFormatException ex) { System.out.println("That was not an float."); } System.out.println("\tFloat read: " + input); System.out.print("Input an float: "); } // read doubles System.out.print("Input an double: "); while (!(currentLine = in.readLine()).equals("")) { double input = 0.0; try { input = Double.parseDouble(currentLine); } catch (final NumberFormatException ex) { System.out.println("That was not an double."); } System.out.println("\tDouble read: " + input); System.out.print("Input an double: "); }