1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
SVEN [57.7K]
3 years ago
12

Given an integer variable i and a floating-point variable f, write a statement that writes both of their values to standard outp

ut in the following format: i=value-of-i f=value-of-f Thus, if i has the value 25 and f has the value 12.34, the output would be: i=25 f=12.34 But if i has the value 187 and f has the value 24.06, the output would be: i=187 f=24.06
Computers and Technology
1 answer:
Dmitry_Shevchenko [17]3 years ago
7 0

Answer:

// here is code in C++.

#include <bits/stdc++.h>

using namespace std;

// main function

int main() {

// variable

int i;

float f;

cout<<"enter an integer:";

// read integer

cin>>i;

cout<<"enter a floating point:";

// read floating point

cin>>f;

// print both

cout<<"i="<<i<<" f="<<f<<endl;

return 0;

}

Explanation:

Read an integer and assign it to "i" then read a floating point and assign it  to "f".After then print "i= value-of-i  f=value-of-f" .

Output:

enter an integer:25                                                                                                        

enter a floating point:12.34                                                                                              

i=25 f=12.34

You might be interested in
What is the symbol that causes the computer to perform string concatenation?
neonofarm [45]

Answer: In java the symbol "+" operator is used to perform string concatenation.

Explanation:

String concatenation refers to joining of two strings. So in java + is used to join strings which works provided one of the operands must be a String variable. Then it works by converting the other variable to String variable and joins the second operand to the end of the first operand.

An example of String concatenation is as follows:

int age = 10;

System.out.println("The boys age is " + age);

Output:

The boys age is 10.

here, the age is integer variable but as the phrase "The boys age is" is a String variable so it converts the age to String variable and joins both the Strings.

4 0
3 years ago
Assume the number variable contains the number 1000.
Inga [223]

Answer:

Explanation:

We could get the four options for this particular example, but we must know what happens with the variable number the value 1000.

In this case, we are going to assume four scenarios:

1) n = n - n this is equal to 0

2) n = (n - n) + n = 1000

3) n = n * 2 = 2000

4) n = n * 3 = 3000

These are simple examples, we could get these options in different ways.

5 0
3 years ago
The __________ method can determine whether a string contains a value that can be converted to a specific data type before it is
luda_lava [24]

Answer:

tryparse method

Explanation:

You can convert a string to a number by calling the TryParse method found on various numeric types (int, long, double, etc.), or by using methods in the System.Convert class.

8 0
3 years ago
What two solutions address lack of human access to clean water
Marina86 [1]

Answer:

THREE strategies which local municipality is implementing in addressing the issue of lack of clean water caused by human factors include:

1) Increasing the amount of tax for those companies which are opening their wastes into water sources which can help built better water cleaning and recycle system.

2) Tree plantation is another strategy to help secure the water sources and naturally keep cleaning it.

3) Running awareness campaigns for general people to keep the water sources clean as well as use the only amount of water which they need and not waste it.

Explanation:

i hope this helps you

5 0
3 years ago
What is a collection of web pages containing text images audio and videos.​
Nata [24]

Answer: A website..?

6 0
3 years ago
Other questions:
  • Select the correct answer.
    8·1 answer
  • When computers are connected and operate through one main computer, it is called a _________ network
    14·2 answers
  • Do you believe that technology has indeed flattened the world in terms of providing
    8·1 answer
  • How do you get the value of an element in an array? And how about for an ArrayList?
    14·1 answer
  • The large program that controls how the CPU communicates with other components is the​
    9·1 answer
  • What is a foreign key and how does it provide referential integrity?
    10·1 answer
  • Why don't I have friends?
    11·2 answers
  • What open source format has multiple versions for storing audio and video content?
    14·1 answer
  • Which would you use to get the number of elements in a dictionary?
    6·1 answer
  • Which testing is used for a program's individual components functionality testing?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!