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
Sav [38]
3 years ago
13

C programming:

Computers and Technology
1 answer:
Margaret [11]3 years ago
8 0
This code is a mess. C doesn't have a bool data type. True and False are actually an integer with the values 1 or 0 respectively.

#include <stdio.h>
void main( int argc, char* argv[] )
{
  int isteenager = 0;
  int kidage = 13;
  if( ( kidage >= 13 ) && ( kidage <= 19 ) )
       isteenager = 1;
  if( isteenager )
       printf( "teen\n" );
  else
       printf( "not teen\n" );
}
You might be interested in
Does this mean that the radius is the input aka 3 ? what about the PI ?
strojnjashka [21]

Explanation:

In  this question

d is known as diameter

r is known as radius

c is known as circumference

pi is known as π

a is known as area

Now, In Maths

Area of circle = π×r×r

Circumference of circle = 2×π×r

Radius (r) = diameter(d)÷2

Given diameter is 6

then, r = 6 ÷2

r = 3

so, diameter = 6

radius = 3

circumference = 2×π×r

                        = 2×3.14×3 ( the value of π is equal to 3.14)

                        = 18.84

Area = π×r×r

= 3.14×3×3 ( the value of π is equal to 3.14)

 = 28.26

6 0
3 years ago
When you call one of the Scanner class's methods to read a primitive value, such as nextInt or nextDouble, and then call the nex
Rzqust [24]

The answer is true.

Explanation:

The scanner class's methods are the methods in java.util, which allows the user to read values of various types. If the nextLine is issued after a numeric read and the numeric value is at the end of the line, nextLine returns the empty string.

The problem occurs when you click the enter key which is a new line \n character. nextInt() has only the integer but skips the new line \n.

To solve this problem, you have to add the input.nextLine() after reading the int it will consume the \n.

Hence, make input.nextLine(); call after input.nextint(); which reads till end of life.

5 0
3 years ago
Which is an example of a natural separation of visitors from employees?
natulia [17]

Answer:

d) desk

Explanation:

srry if this is wrong ;

4 0
3 years ago
What are the advantages and drawbacks of using solar energy
Ray Of Light [21]

upfront price, but dependent on how long you use it you will save money, also the power it provides per square inch is low but that will be solved with time.

5 0
3 years ago
6. A password contains at least 8 distinct digits. It takes 12 seconds to try one combination, what is the minimum amount of tim
Agata [3.3K]

Answer:

6048 hours is required to guarantee access to the database

Explanation:

If a password contains 8 distinct digits, then there are P(10,8) permutations possible

P(10,8)=10! / (10-8)! = 10!/2! = 1814400

Since it takes 12 seconds to try one combination,

1814400×12 = 21772800 seconds is required to guarantee access to the database. This is \frac{21772800}{3600}=6048 hours

7 0
4 years ago
Other questions:
  • How many bones are in a human body
    7·2 answers
  • A usability study compares the number of page visits on a web site. Half of the participants saw Version A of the home page. The
    13·1 answer
  • Which level of education do most peoplebecoming a broadcast analyst obtain?
    13·2 answers
  • .
    8·1 answer
  • GUYS PLEASEEEE HELP !!!
    12·2 answers
  • One benefit of open source software is that it
    9·1 answer
  • How could you represent the following binary color in hexadecimal? What is its numerical value? What color is it? How
    13·1 answer
  • Make a program that receives several integers (the program ends when a negative number is entered) and shows how many times the
    14·1 answer
  • Who is this wrong answers only
    7·1 answer
  • Which two features offered by SharePoint
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!