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
aniked [119]
2 years ago
8

What is the largest possible value that the variable x can have after the code segment executes? 17 17 A 14 14 B 11 11 C 4

Computers and Technology
1 answer:
Bogdan [553]2 years ago
6 0

Answer:

i dont know sorry man no problem listed

Explanation:

You might be interested in
What is one advantage of hard-disk recording?
NemiM [27]

Answer:

It allows for Non-linear editing

7 0
3 years ago
Write a static method that implements a recursive formula for factorials. Place this method in a test program that allows the us
matrenka [14]

Answer:

Written in Java

import java.util.*;

public class Main {

  public static int fact(int n) {

     if (n == 1)

        return n;

     else

        return n * fact(n - 1);

  }

  public static void main(String[] args) {

     int num;

     Scanner input = new Scanner(System.in);

     char tryagain = 'y';

     while(tryagain == 'y'){

     System.out.print("Number: ");

     num = input.nextInt();

     System.out.println(num+"! = "+ fact(num));

     System.out.print("Try another input? y/n : ");

     tryagain = input.next().charAt(0);

}        

  }

}

Explanation:

The static method is defines here

  public static int fact(int n) {

This checks if n is 1. If yes, it returns 1

     if (n == 1)

        return n;

If otherwise, it returns the factorial of n, recursively

     else

        return n * fact(n - 1);

  }

The main method starts here. Where the user can continue executing different values of n. The program keep prompting user to try again for another number until user signals for stoppage

  public static void main(String[] args) {

This declares num as integer

     int num;

     Scanner input = new Scanner(System.in);

This initializes tryagain as y

     char tryagain = 'y';

This checks if user wants to check the factorial of a number

     while(tryagain == 'y'){

This prompts user for input

     System.out.print("Number: ");

This gets user input

     num = input.nextInt();

This passes user input to the function and also prints the result

     System.out.println(num+"! = "+ fact(num));

This prompts user to try again for another value

     System.out.print("Try another input? y/n : ");

This gets user response

     tryagain = input.next().charAt(0);

}        

Download txt
4 0
2 years ago
Why was unicode invented?
Julli [10]
Unicode was invented to create a "universal text", or a language framework that any computer or device could understand. 


5 0
3 years ago
Please help!
34kurt

Answer:

I don't know the exact fix to this because I don't know exactly what you're talking about, but I do suggest you instead just highlight with shift and the arrow keys to make it much simpler.

7 0
2 years ago
Podcasts are a type of social media that is experienced primarily through
Vanyuwa [196]

they are experienced through a listening

4 0
2 years ago
Other questions:
  • Steven is in a meeting and he is sharing a graph on his monitor with fifty other people. So that the others do not need to crowd
    9·1 answer
  • If you have a mix of 32-bit and 64-bit versions of windows, which architectures should you add a unattended installation file fo
    7·1 answer
  • What are the two most popular applications of theInternet?
    7·1 answer
  • What is the model for 2017 Ford Mustang v6
    15·1 answer
  • Here's a better picture of my pc mouse and keyboard​
    5·2 answers
  • How many megapixels is in a macbook air 2017 camera
    10·1 answer
  • What do computer programs generally try to solve and how? A) Computer programs generally try to solve a well-defined problem usi
    14·1 answer
  • Explains why we use tables in documents; and is at least three sentences long in word office 360​
    15·1 answer
  • Which of the following is not a reason to choose a community college?
    14·1 answer
  • Rewrite the code below so that a transformation moves the div 100px to the right and 50px upward.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!