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
In what decade was photography invented? the 1800s the 1820s the 1840s the 1860s
frutty [35]

Answer:

In the year 1820's

It is B

4 0
3 years ago
A deleted file or folder is not permanently deleted from a computer until which event occurs?
Dimas [21]

Answer:

The computer is restarted. The Recycle Bin or Trash is emptied

Explanation:

8 0
2 years ago
Which type of network attack uses a fake IP address to send data packets from an unauthorized user to a network?
liq [111]
D. DoS. DoS is a way to potentially lag or even crash different types of servers ranging from as small as a simple website to bigger websites and video games servers.
6 0
3 years ago
Read 2 more answers
You would like the user of a program to enter a customer’s last name. Write a statement thaUse the variables k, d, and s so that
mojhsa [17]

Answer:

1st question:

Use the variables k, d, and s so that they can read three different values from standard input an integer, a float, and a string respectively. On one line, print these variables in reverse order with exactly one space in between each. On a second line, print them in the original order with one space in between them.

Solution:

In Python:

k = input()  #prompts user to input value of k i.e. integer value

d = input()  #prompts user to input value of d i.e. float value

s = input()  #prompts user to input value of s i.e. a string

print (s, d, k)  #displays these variable values in reverse order

print (k, d, s)#displays these variable values in original order

In C++:

#include <iostream>    // to use input output functions

using namespace std;   //to identify objects like cin cout

int main() {    //start of main function

  int k;   //declare int type variable to store an integer value

  float d; //  declare float type variable to store a float value

  string s;   //  declare string type variable to store an integer value

  cin >> k >> d >> s;    //reads the value of k, d and s

  cout << s << " " << d << " " << k << endl;     //displays these variables values in reverse order

  cout << k << " " << d << " " << s << endl;   } // displays these variable values in original order

Explanation:

2nd question:

You would like the user of a program to enter a customer’s last name. Write a statement that asks user "Last Name:" and assigns input to a string variable called last_name.

Solution:

In Python:

last_name = input("Last Name:")

# input function is used to accept input from user and assign the input value to last_name variable

In C++:

string last_name;  //declares a string type variable named last_name

cout<<"Last Name: ";  // prompts user to enter last name by displaying this message Last Name:

cin>>last_name; // reads and assigns the input value to string variable last_name

The programs alongwith their outputs are attached.

6 0
3 years ago
Margaret would like to work in the Journalism and Broadcasting industry. Which set of qualifications would best assist Margaret
8_murik_8 [283]
Critical thinking, accuracy and confidence
7 0
3 years ago
Read 2 more answers
Other questions:
  • 1. Write a program to prompt the user to enter a single character and respond back whether or not the character is valid dna. 2.
    12·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
  • Which of the following parameters should match in order for a pair of routers to form an adjacency when running OSPFv2? (Points
    9·1 answer
  • When activated, an Excel object has all the features of an Excel
    8·2 answers
  • How do you calculate typing speed
    8·1 answer
  • In Microsoft Word you can access the _______ command from the "Mini toolbar." 
    9·1 answer
  • Exercise 4: Bring in program grades.cpp and grades.txt from the Lab 10 folder. Fill in the code in bold so that the data is prop
    12·1 answer
  • Blender is used by which video game team member?
    15·1 answer
  • Why are Quick Parts useful in an Outlook message?
    5·1 answer
  • Five plus six is equal to?​
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!