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
Yakvenalex [24]
3 years ago
9

Write an if/else statement that assigns 0 to x when y is equal to 10; otherwise it should assign

Computers and Technology
1 answer:
Liono4ka [1.6K]3 years ago
7 0

Answer:

if(y==10)

{

     x=0;   // assigning 0 to x if y equals 10.

}

else

{

   x=1;   // assigning 1 to x otherwise.

}

Explanation:

In the if statement i have used equal operator == which returns true if value to it's right is equal to value to it's left otherwise false.By using this operator checking value of y and if it is 10 assigning 0 to x and if it is false assigning 1 to x.

You might be interested in
Create a class Str that subclasses str. Add a method to the subclass that checks if the string does not start with a given strin
Stolb23 [73]

Answer:

#include <iostream>

using namespace std;

class Str{  ///baseclass

   public :

   string super_str;

   string getStr()

   {

       return super_str;

   }

   void setStr(string String)

   {

       super_str=String;

   }

};

class str : public Str{   //inheriting Str publicly

   public :

       string sub_str;

       string getstr()

       {

           return sub_str;

       }

       void setstr(string String)

       {

           sub_str=String;

       }

       bool notstartswith()

       {

           int n=sub_str.length();   //to find length of substr

           bool flag=false;

           for(int i=0;i<n;i++)     //Loop to check beginning of Str

           {

               if(super_str[i]!=sub_str[i])

               {

                   flag=true;

                   break;

               }

           }

           return flag;

       }

};

int main()

{

   str s;    //object of subclass

   s.setStr("Helloworld");  

   s.setstr("Hey");

   if(s.notstartswith()==1)     //checking if str is substring of Str

       cout<<"Str does not start with str";

   else

       cout<<"Str starts with str";

   return 0;

}

OUTPUT :

Str does not start with str

Explanation:

Above program is implemented the way as mentioned. for loop is being used to check the beginning of the str starts with substring or not.

3 0
4 years ago
AUPs ensure that an organization’s network and internet are not abused. Select 3 options that describe AUPs.
tigry1 [53]

AUPs often involves not going onto unauthorized sites or downloading certain content, not using the service to violate any law, and not connecting to unauthorized devices through the network.

<h3>What is AUP?</h3>

AUP stands for Acceptable Use Policy, which refers to a policy that regulates users when they access a corporate newtork.

<h3>How does an AUP regulates users?</h3>

Most AUPs imply:

  • Users can only access certain sites and dowloading specific content is forbidden.
  • The access to the internet or network cannot be used for criminal purposes.
  • Only authorized users can connect to the corporate network.

Learn more about AUP in: brainly.com/question/9509517

#SPJ1

8 0
2 years ago
You need to configure your Android phone so that you can receive your Yahoo email on the device. What information would you need
Llana [10]

Answer:

To configure an Android phone to receive Yahoo email on the device, you would need to provide the:

full Yahoo email address and password.

Explanation:

The provision of your full Yahoo email address and password enables you to receive your Yahoo emails on the device.  Most often, the device requests to save the information to enable it to notify you of incoming emails.  There are settings for the provision of this notice.  The user can also synchronize Yahoo emails on all the devices by selecting the Sync button.

5 0
3 years ago
TULPCOAONIAC<br>TRUOESP<br> this is un scrambled word​
MaRussiya [10]

<em>Answer:</em>

1.)OCCUPATIONAL

2.)POSTURE

<em>This is the answer thank youu!</em>♡︎♡︎

4 0
3 years ago
Read 2 more answers
Cooper read an interesting article about scientists finding life on Mars and posted a link to it on his social media profile. Co
almond37 [142]
He should've paid more attention to his friends teasing him. It was an honest mistake and easy to do, we're all human. 
5 0
3 years ago
Other questions:
  • Only the _________ can add users with passwords and limit user access to selected areas.
    5·1 answer
  • What is the solubility of an empty soda can
    10·1 answer
  • A negative effect of computer technology's role in creating images is that:
    13·2 answers
  • A network technician is asked to redesign an Ethernet network before some new monitoring software is added to each workstation o
    7·1 answer
  • Declare an array named a of 10 elements of type int and initialize the elements (starting with the first) to the values 10, 20,
    13·1 answer
  • Which type of operating system is usually used in personal computers
    13·1 answer
  • Melanie needs to ensure that readers are able to locate specific sections within a document easily. What should she include in
    8·1 answer
  • Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integer
    11·1 answer
  • A marketing firm has been hired to help a client understand how their online brand is perceived. The firm has set up a system to
    14·1 answer
  • Different Betweens ServerPc And Desktop Pc ~
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!