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
ololo11 [35]
3 years ago
9

Assume that name and age have been declared suitably for storing names (like "abdullah", "alexandra" and "zoe") and ages respect

ively. assume also that stdin is a variable that references a scanner object associated with standard input. write some code that reads in a name and an age and then prints the message "the age of name is age" on a line by itself, where name and age are replaced by the values read in for the variables name and age. for example, if your code read in "rohit" and 70 then it would print out "the age of rohit is 70" on a line by itself. there should not be a period in the output.
Computers and Technology
1 answer:
Troyanec [42]3 years ago
7 0
Name = "Bob"
age = 50

print("The age of" , name , "is" , age)
You might be interested in
Write a for loop that will print the values 1 to 20 while skipping the odd numbers (2,4,6,8,10,12,14,16,18,20):
DochEvi [55]

<u>Answer:</u>

<em>void main ( )  </em>

<em> {  </em>

<em> int counter;  </em>

<em>  cout<<""Even numbers between 1 to 20 are:""<<endl ;  </em>

<em> //Method 1 </em>

<em>  for (counter = 1; counter <= 20; counter++)  </em>

<em>  {  </em>

<em>    if ( counter%2 == 0)  </em>

<em>   {   </em>

<em>     cout<<counter<<""\t""<<endl ;  </em>

<em>   }  </em>

<em>  }  </em>

<em>//Method 2 – simplest one </em>

<em>for (counter = 2; counter <= 20;)  </em>

<em>  {  </em>

<em>     cout<<counter<<""\t""<<endl ;  </em>

<em>counter = counter + 2; </em>

<em>    </em>

<em>  } </em>

<em> </em>

<em>  return 0;  </em>

<em>} </em>

<u>Explanation:</u>

In this, Method 1 runs a for loop and check whether each number is divided by 2. If yes, then printed otherwise it is skipped.

In the second method, it runs for loop only for even numbers. <em>This is obtained by incrementing the counter by 2. </em>

6 0
3 years ago
In the written Hawaiian language, only 13 letters are used: the five vowels (a,e,i,o, and u), and 8 consonants (h,k,l,m,n,p,w, a
Sergeu [11.5K]

Answer:

see explaination

Explanation:

Code below:

#include"letters.h"

int main()

{

while(1)

{

int input;

//Asks the user to enter 1 or 2 to see if the letter is a consonant

//of vowel.

printf("Enter 1 to check vowel or 2 for consonant:");

//scans inputted number

scanf("%i", &input);

//if the input is 1 then it will ask the user to enter the letter

//they want to test.

if(input == 1)

{

char c;

printf("Enter a character to test if it's a vowel:");

scanf(" %c",&c);

//if it is a vowel, then it will print that the letter is a vowel

if(is_vowel(c))

{

printf("%c is a vowel.\n", c);

}

//if not, then it will print that it isn't a vowel

else

{

printf("%c is not a vowel.\n", c);

}

}

//if the user inputs 2, then it will ask the user for the letter to test if

//it's a consonant or not.

else if(input == 2)

{

char c;

printf("Enter a character to test if it's a consonant:");

scanf(" %c",&c);

//if it is a consonant, then it will print that the letter is a consonant

if(is_h_consonant(c))

{

printf("%c is a consonant.\n", c);

}

//if not, then it will tell the user that it isn't a consonant

else{

printf("%c is not a consonant.\n", c);

}

}

else{

break;

}

}

return 0;

}

See attachment for sample output

4 0
3 years ago
Apples and bananas apples and bananas
melamori03 [73]

Answer:

bananas and apples bananas and apples?

Explanation:

8 0
3 years ago
Read 2 more answers
In your own point of view, what is the importance of considering the relationship of the basic design concept like line, color,
bazaltina [42]

Answer:

future

Explanation:

4 0
3 years ago
List four types of ic packages​
Pani-rosa [81]

Answer:

C-DIP: Ceramic Dual In-line Package.

CERDIP: Ceramic DIP, which is the same as C-DIP.

CPGA: Ceramic Pin Grid Array.

DIL: Dual In-Line; see note below.

DIP: Dual In-line Package; DIP Socket Styles.

TBD: Dual In-line Zig-Zag Package; Zig-Zag Package.

HDIP: Hermetic DIP.

PDIP: Plastic DIP [P-DIP]

Explanation:

6 0
3 years ago
Other questions:
  • Suppose that TCP's current estimated values for the round trip time (estimatedRTT) and deviation in the RTT (DevRTT) are 400 mse
    9·1 answer
  • State two ways a local area network can be used to monitor the work of employees
    11·1 answer
  • Bob flys a drone which has a 20 megapixel camera attached, what is the definition of "megapixel in this context? Why does it mat
    7·1 answer
  • Felicia has been having problems with her computer. Her documents won’t open, her computer is running slow, and programs automat
    7·1 answer
  • Someone claims that the big O notation does not make sense at all, and they give the following example. An algorithm A that proc
    15·1 answer
  • Which type of program would allow Adriana to see what she is creating rather than just a code
    14·2 answers
  • A new company has proposed a number of different cache layouts for their system and you’ve
    10·1 answer
  • Write a program to change background colour of your visual basic form with any 3 different events.​
    15·2 answers
  • Write a program in Java programming language to display or calculate “Hello, Daddy and Mum”
    15·1 answer
  • Which of the following is an OOP principle that is represented by putting medicine inside a pill capsule to make it easier to sw
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!