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
Ksenya-84 [330]
2 years ago
8

Given that an integer variable i and a floating-point variable f have already been declared and given values: Write a statement

in C that displays the values of i and f to standard output in the following format: i=value-of-i f=value-of-f
Two Examples:
Example 1: if the values of i and f were 25 and 12.34 respectively, the output would be: i=25 f=12.34
Example 2: if the values of i and f's value were 703 and 3.14159, (respectively) the output would be: i=703 f=3.14159
Computers and Technology
1 answer:
Wewaii [24]2 years ago
6 0

Answer:

Follows are the given statement to this question:

printf("i=%d f=%f", i, f);//print value

Explanation:

The full code to the given question:

code:

#include <stdio.h>//defining header file

int main()// main method

{

   int i;//declaring integer variable

   float f;//declaring float variable

   i=25; //assign integer value

   f=12.34;//assign float value

   printf("i=%d f=%f", i, f);//print value

   i=703;//assign integer value

   f=3.14159;//assign float value

   printf("\n");//for line break

   printf("i=%d f=%f", i, f);//print value

   return 0;

}

Output:

i=25 f=12.340000

i=703 f=3.141590

In the above-given code, the two variable "i and f" is declared, that holds integer and floating-point value in its respective variable and use the print method, to print "i and f" variables value.  

You might be interested in
Assume that sentence is a variable that has been associated with a string consisting of words separated by single space characte
sleet_krkn [62]

The right code is,

secondWord = sentence.substr (sentence.find ("`") + 1);

secondWord = secondWord.substr (0, secondWord.find ("`"));

3 0
2 years ago
Read 2 more answers
A client contacted you to request your help in researching and supplying the hardware necessary to implement a SOHO solution at
Tcecarenko [31]

Answer:

Option 2 i.e., DHCP server.

Explanation:

A client approached the user to ask about their support towards investigating as well as providing necessary equipment required for implementing a SOHO system for his latest house corporation.  

So, the following SOHO router functionality facilitates the installation of IP addresses both for the cable and wireless networks on the private server.

7 0
3 years ago
If you design your pages using a font that your user does not have installed, the browser defaults to ____ on a macintosh.
sveticcg [70]
The browser should default to Calibri (body)
3 0
2 years ago
Who will help me with a test on Computer Science plz will help you level up and upvotes!!!!! plzzzzzzzzzzzzzzzzzzz
Diano4ka-milaya [45]
Sure, depends what you need help with!
5 0
2 years ago
Read 2 more answers
How to do this PLEASE HELP 80 points!
sp2606 [1]

When reading the story, you know that the code has been created by humans, so it might actually be english and use concepts like our number system, our computer code system (I'm thinking ASCII), things that you should not assume when decoding a real alien message.

Looking at the numbers I notice that digits 6 to 9 do not occur in the message, which is statistically unexpected. This leads me to believe the number base might be 6 rather than our common base 10. In the story there are insects mentioned. Insects have 6 legs, so this makes sense (after all, our base 10 was based on the number of fingers).

Next, I notice the code 052 appearing regularly, so that could be a space. Let's check a hypothesis. 052 in base 6 is 5*6+2 = 32. 32 is the ASCII code for a space!!

Now, a decoding algorithm is ready to be devised:

"for each number in the sequence, parse it as a base-6 number and then print out its corresponding ASCII value".

The following node.js snippet does this:

var code = ['220','241','255','245','052','313',

           '311','052','312','303','052','312',

           '252','245','052','205','241','251',

           '253','243','052','203','253','302',

           '251','244','303','301','053'];

           

var msg = "";

for (let n of code) {

   msg += String.fromCharCode(parseInt(n,6));

}

console.log(msg);


And the message is.........:

<em>Take us to the Magic Kingdom!</em>

So, do these aliens want to visit Disneyland????

5 0
2 years ago
Other questions:
  • Jesse purchases a new smartphone and is immediately able to use it to send a photo over the Internet to a friend who lives in a
    12·1 answer
  • The program prompts the user to interactively enter eight batting averages, which the program stores in an array. The program sh
    9·1 answer
  • What is required to control access to the file system using file and folder permissions on a windows based computer?
    8·1 answer
  • Which of the following Web sites would be MOST credible?
    6·1 answer
  • The theory of logic set the foundation for what aspect of computing today?
    11·1 answer
  • Ports that are generally used to establish outbound connections are known as ___ ports.
    14·1 answer
  • Pls help computer science I will give brainliest
    8·2 answers
  • The owner of a candle shop has asked for your help. The shop sells three types of candles as shown below:
    9·1 answer
  • Assume there is a 30-byte heap. The free list for this heap has two elements on it. One entry describes the first 10-byte free s
    15·1 answer
  • if anyone is on a Chromebook, do you ever mean to press backspace, then you accidentally press the power button and think "OH CR
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!