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
tekilochka [14]
3 years ago
6

Sonja is writing a program to compare two numbers and print the larger number. Which of these should be used?

Computers and Technology
1 answer:
seropon [69]3 years ago
7 0

Answer:

if and else

Explanation:

if (num1 > num2):

   print(num1)

else:

   print(num2)

You might be interested in
Users of an extranet can access a company or organization’s entire intranet
Tasya [4]

Answer:

yes

Explanation:

yes

4 0
3 years ago
Read 2 more answers
1 Which skill-based video game requires quick reflexes and skills with weapons?
kirill [66]

The Answer to Number 1 is Shooter Games

The Answer to Number 2 is Dice Throwing

The Answer to Number 3 is Games are organized play

The Answer to Number 4 is Either Simulation or Adventure

The Answer to Number 5 is Stories have no rules to follow, you can learn from countless other lifetime through stories

The Answer to Number 6 is Setting

The Answer to Number 7 is False

The Answer to Number 8 is Objective

7 0
3 years ago
What is logic gate? ​
Firdavs [7]
A logic gate is an idealized or physical device implementing a Boolean function; that is, it performs a logical operation on one or more binary inputs and produces a single binary output.
7 0
3 years ago
Read 2 more answers
A network administrator is implementing a token system in which a hardware device is used to store a password. The password is u
nlexa [21]

Answer:

D) Privilege escalation

Explanation:

Privilege escalation is a situation whereby an attacker exploits a privilege escalation vulnerability in a target system which then allows to override the user account.

A token system is usually vulnerable to privilege escalation attacks. The hacker usually acts as a middle man between the original user and the system. The hacker solicits for the token output from the legitimate user which he then supplies to the system for authentication to gain entrance.

5 0
3 years ago
Read 2 more answers
Language: C
Vikentia [17]

The .cpp code is avaiable bellow

Code:

#include <stdio.h>

#include <string.h>

int main()

{

    char **kW;

    char *fN;

    int nW = 0;

    kW = malloc(5000 * sizeof(char*));

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

    {

         kW[i] = (char *)malloc(15);

    }

    fN = (char*)malloc(25);

    int choice;

    while (1)

    {

         printf("1) File text to use as cipher\n");

         printf("2) Make a cipher with the input text file and save result as output file\n");

         printf("3) Decode existing cipher\n");

         printf("4) Exit.\n");

         printf("Enter choice: ");

         scanf("%d", &choice);

         if (choice == 1)

         {

             nW = readFile(kW, fN);

         }

         else if (choice == 2)

         {

             encode(kW, fN, nW);

         }

         else

         {

             Exit();

         }

         printf("\n");

    }

    return 0;

}

int readFile(char** words, char *fN)

{

    FILE *read;

    printf("Enter the name of a cipher text file:");

    scanf("%s", fN);

    read = fopen(fN, "r");

    if (read == NULL)

    {

         puts("Error: Couldn't open file");

         fN = NULL;

         return;

    }

    char line[1000];

    int word = 0;

    while (fgets(line, sizeof line, read) != NULL)

    {

         int i = 0;

         int j = 0;

         while (line[i] != '\0')

         {

             if (line[i] != ' ')

             {

                  if (line[i] >= 65 && line[i] <= 90)

                  {

                       words[word][j] = line[i]; +32;

                  }

                  else

                  {

                       words[word][j] = line[i];

                  }

                  j++;

             }

             else

             {

                  words[word][j] = '\n';

                  j = 0;

                  word++;

             }

             i++;

         }

         words[word][j] = '\n';

         word++;

    }

    return word;

}

void encode(char** words, char *fN, int nwords)

{

    char line[50];

    char result[100];

    if (strcmp(fN, "") == 0)

    {

         nwords = readFile(words, fN);

    }

    getchar();

    printf("Enter a secret message(and press enter): ");

    gets(line);    

    int i = 0, j = 0;

    int w = 0, k = 0;

    while (line[i] != '\0')

    {        

         if (line[i] >= 65 && line[i] <= 90)

         {

             line[i] = line[i] + 32;

         }

         w = 0;

         int found = 0;

         while (w<nwords)

         {

             j = 0;

             while (words[w][j] != '\0')

             {

                  if (line[i] == words[w][j])

                  {

                       printf("%c -> %d,%d \n", line[i], w, j);

                       found = 1;

                       break;

                  }

                  j++;

             }

             if (found == 1)

                  break;

             w++;

         }

         i++;

    }

    result[k] = '\n';

}

void Exit()

{

    exit(0);

}

3 0
3 years ago
Other questions:
  • What task can a user accomplish by customizing theme colors?
    14·2 answers
  • I need help pls, in this code if add row for example :
    8·1 answer
  • Microsoft acknowledged that if you type a res:// url (a microsoft-devised type of url) which is longer than ____ characters in i
    9·1 answer
  • The ________ phase is a technical blueprint for a whole system which captures all aspects of how the system's components will fu
    9·1 answer
  • What does the action tool allow you to do in Microsoft power point?
    9·1 answer
  • ______ is a disadvantage of EDI.
    8·1 answer
  • Which of these is the term used to describe the location of an Internet page? A) social network B) Web address C) blog D) net
    6·2 answers
  • Question # 2
    7·1 answer
  • Which of these is an advantage of having multiple layers in a drawing and enables you to make changes to one part of an image wi
    14·1 answer
  • Which block in this module represents the variable?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!