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
Serhud [2]
3 years ago
6

Write an if-else statement that assigns 0 to the variable b if the variable a is less than 10. Otherwise, it should assign 99 to

the variable b .
Computers and Technology
1 answer:
barxatty [35]3 years ago
8 0

espanol;

Escriba una declaración if-else que asigne 0 a la variable b si la variable a es menor que 10. De lo contrario, debería asignar 99 a la variable b

<h3>respuesta:</h3><h3><u>Una declaración if le dice al programa que ejecute un bloque de código, si una condición es verdadera. En el siguiente código, escribimos un mensaje solo si x es mayor que 0:</u></h3><h3><u>var x = 5;</u></h3><h3><u /></h3><h3><u>if (x > 0) {</u></h3><h3><u>   text('¡x es un número positivo!', 200, 200);</u></h3><h3><u>}</u></h3>

ingles;

Write an if-else statement that assigns 0 to the variable b if the variable a is less than 10. Otherwise, it should assign 99 to the variable b .

<h3> answer:</h3><h3 /><h3>An if statement tells the program to execute a block of code, if a condition is true. In the following code, we write a message only if x is greater than 0:</h3><h3>var x = 5;</h3><h3 /><h3>if (x> 0) {</h3><h3>   text ('x is a positive number!', 200, 200);</h3><h3>}</h3><h3 /><h3 /><h3>xd </h3>
You might be interested in
The maximum-valued element of an integer-valued array can be recursively calculated as follows: If the array has a single elemen
Tasya [4]

Solution :

#include <iostream>

using namespace std;

//Function Declaration

int max(int arr[],int size);

int main()

{

//Declaring variable

int size;

 

while(true)

{

cout<<"Enter the no of elements in the array :";

cin>>size;

if(size<=0)

{

  cout<<"Invalid.Must be greaterthan Zero"<<endl;

  continue;

  }

  else

  break;

  }

 

//Creating an array

int arr[size];

/* getting the inputs entered by

* the user and populate them into array

*/

for(int i=0;i<size;i++)

{

cout<<"Enter element#"<<i+1<<":";

cin>>arr[i];

}

//calling function

int maximum=max(arr,size);

//Displaying the output

cout<<"The maximum Element in the Array is :"<<maximum<<endl;

return 0;

}

/* Function implementation which finds

* the maximum element in the array and return it

*/

int max(int arr[],int size)

{

//Declaring the static variables

static int k=0,maximum=-999;

 

/* This if block will execute only if the value of k

* is less than the size of an array

*/

if(k==size-1)

{

   return arr[0];

  }

else if(size-1>k)

{

if(arr[k]>maximum)

maximum=arr[k];

 

//Incrementing the k value

k++;

 

//Calling the function

max(arr,size);

}

return maximum;

}

4 0
3 years ago
Which tab do you select to change how you see your Word document on screen?
seraphim [82]

Answer:view

Explanation:i just took the test

8 0
3 years ago
Read 2 more answers
If you have a long title for a table and need it to span several cells you use
dsp73
If you are talking about on Microsoft Excel then you merge the cells.
6 0
3 years ago
Explain the concept of “survival of the fittest”
klasskru [66]

Answer:

i think thats a line from  the lorax

Explanation:

4 0
3 years ago
What is the use of an NDP?
Makovka662 [10]

Answer:

It defines five ICMPv6 packet types for router solicitation,router advertisement,neighbor solicitation,neighbor advertisement,and network redirects.

Explanation:

8 0
3 years ago
Other questions:
  • To support an internet client, you must have six elements. the first three -- a computer, an operating system and tcp/ip -- are
    7·1 answer
  • Describe the concepts of Defense in Depth and Detection in Depth. Compare and contrast. What's different? What's similar?
    9·1 answer
  • How does teamwork help in developing a quality outcome?
    7·1 answer
  • Which is a good way to improve your credit score
    5·1 answer
  • Please can someone help me with this?
    6·1 answer
  • There is one clear definition of IT. True False
    7·1 answer
  • What are the steps to view two different versions of the same document at once? 1. Go to the File tab on the ribbon. 2. Select T
    6·1 answer
  • You can tell a cell is the active cell when it has a
    12·2 answers
  • Hi this is for computer and technology experts out there but can someone tell me why my dell computer charger wont work please h
    13·2 answers
  • Someone put malware on your computer that records all of your keystrokes. what aspect of security was primarily attacked? choose
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!