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
Gwar [14]
3 years ago
5

Write an if else statement that assigns 0 to the variable b and assigns 1 to the variable c if the variable a is less than 10. O

therwise, it should assign -99 to the variable b and assign 0 to the variable c.
Computers and Technology
1 answer:
brilliants [131]3 years ago
4 0

Answer:

if(a < 10)

{ b = 0; c = 1;}

else

{ b = -99; c = 0;}

Explanation:

You might be interested in
16. Budget Analysis Write a program that asks the user to enter the amount that he or she has budgeted for a month. A loop shoul
strojnjashka [21]

Answer:

import java.util.Scanner;

public class num8 {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Enter month's budget");

       double monthBudget = in.nextDouble();

       double totalExpenses = 0.0;

       double n;

       do{

           System.out.println("Enter expenses Enter zero to stop");

           n = in.nextDouble();

           totalExpenses += n;

       }while(n>0);

       System.out.println("Total expenses is "+totalExpenses);

System.out.println("The amount over your budget is "+ Math.abs(monthBudget-totalExpenses));

   }

}

Explanation:

  • Using Java programming language
  • Prompt user for month's budget
  • Use Scanner class to receive and store the amount entered in a variable
  • Use a do while loop to continuously request user to enter amount of expenses
  • Use a variable totalExpenses to add up all the expenses inside the do while loop
  • Terminate the loop when user enters 0 as amount.
  • Subtract totalExpenses from monthBudget and display the difference as the amount over the budget

6 0
2 years ago
Expresa tu reflexión sobre la necesidad de un código de etica para la IA (inteligencia artificial) , oponia sobre los bots en la
JulsSmile [24]

Answer:

Ethics in artificial intelligence and robotics are of greater importance today as machine learning or robots are put to use to benefit humans and also ti harm humans.

Explanation:

Ethics in robotics or artificial intelligence in sometimes referred to as "roboethics". It is very necessary in todays time because robots are made to interact with the society, the humans.

This is the key concern for ethics which is based on growing awareness of the requirement to regulate, the  advancements in the field of AI in the near future. The future law or regulations should be on the basis of some of the shared values such as privacy, freedom, security, respect for human dignity, non - military, inclusions, etc. Here, the uncertainty is also being recognized, the uncertainty to know the advancements of AI in the near future. Therefore the regulations and ethical dilemmas should be rethought in the middle.

4 0
3 years ago
POINT BOOST:
stiv31 [10]

glenn

she's good what's your

8 0
2 years ago
What's the problem with this code ?
Svet_ta [14]
Hi,

I changed your program using some of the concepts you were trying to use. Hopefully you can see how it works:

#include <string>
#include <iostream>
#include <sstream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   short T;
   cin >> T;
   cin.ignore();

   string str[100];

   for(int i=0; i<T; i++)
   {
      getline(cin, str[i]);
   }

   for (int i = 0; i < T; i++)
   {
      stringstream ss(str[i]);
      string tmp;
      vector<string> v;

      while (ss >> tmp)
      {
          // Let's capitalize it before storing in the vector
          if (!tmp.empty())
          {
              transform(begin(tmp), end(tmp), std::begin(tmp), ::tolower);
              tmp[0] = toupper(tmp[0]);
           }
           v.push_back(tmp);
        }

        if (v.size() == 1)
        {
           cout << v[0] << endl;
        }
        else if (v.size() == 2)
        {
           cout << v[0][0] << ". "  << v[1] << endl;
        }
        else
        {
            cout << v[0][0] << ". " << v[1][0] << ". " << v[2] << endl;
        }
    }

     return 0;
}

4 0
2 years ago
If an investigator finds a computer that is turned off during a search with a warrant, the investigator should:___________.
cluponka [151]

Answer:

B. leave the computer turned off.

Explanation:

8 0
3 years ago
Other questions:
  • Select the proper ergonomic keyboarding techniques.
    15·2 answers
  • A statement describing both the requirements that must be met by a product or process amd the ways in which satisfaction of the
    8·2 answers
  • This LEGENDARY character made a much-celebrated comeback in 2017. What was the name of the villain he faced in this epic tale?
    7·2 answers
  • If variable x has value 2 and y has value 2, what is the value of the following Jack expression?
    9·1 answer
  • Which is not an element of photography? a Cropping b Height c Directional Lighting d Framing
    11·1 answer
  • What laptops can you get for 2500$ and should mostly using Microsoft applications.
    14·2 answers
  • Who PLAYS Apex Legend?
    10·2 answers
  • Match each example to the type of component, either Input, Process, or Output.
    12·1 answer
  • Which statement best describes the problem statement below?
    6·1 answer
  • Explain drawing and painting package.​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!