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
olchik [2.2K]
4 years ago
13

Write a function solution that returns an arbitrary integer which is greater than n.

Computers and Technology
1 answer:
Aleksandr-060686 [28]4 years ago
4 0

Answer:

   public static int greaterThanInt(int n){

       return n+10;

   }

Explanation:

This is a very simple method in Java. it will accept an argument which is an integer n and return n+10 since the question requires that an arbitrary integer greater than n be returned adding any int value to n will make it greater than n.

A complete java program calling the method is given below:

<em>import java.util.Scanner;</em>

<em>public class ANot {</em>

<em>    public static void main(String[] args) {</em>

<em>        Scanner in = new Scanner(System.in);</em>

<em>        System.out.println("Please enter an integer");</em>

<em>        int n = in.nextInt();</em>

<em>        int greaterInt = greaterThanInt(n);</em>

<em>        System.out.println("You entered "+n+", "+greaterInt+" is larger than it");</em>

<em>    }</em>

<em>    public static int greaterThanInt(int n){</em>

<em>        return n+10;</em>

<em>    }</em>

<em>}</em>

You might be interested in
Wanna play pubg<br><br><br>ill send u my id​
Nikitich [7]
My sister would what’s your id
6 0
3 years ago
Read 2 more answers
The Sarbanes-Oxley Act restricts electronic and paper data containing personally identifiable financial information.A. True
Zarrin [17]

Answer:

B. False

Explanation:

Sarbanes-Oxley Act or SOX also known as the Public Company Accounting Reform and Investor Protection Act and Corporate and Auditing Accountability, Responsibility, and Transparency Act is a United State federal law that creates or modify requirements for U.S public company board, management and public accounting firm. some of its policies are meant for private companies as well.

This act does not restrict any electronic and paper data containing personally identifiable financial information.

6 0
4 years ago
Define a function SetTime, with int parameters hoursVal and minutesVal, that returns a struct of type TimeHrMin. The function sh
Lapatulllka [165]

Answer:

#include <stdio.h>

typedef struct TimeHrMin_struct //struct

{

int hours;

int minutes;

} TimeHrMin;

struct TimeHrMin_struct SetTime(int hoursVal,int minutesVal) //SetTime function

{

struct TimeHrMin_struct str;

str.hours=hoursVal; //assigning the values

str.minutes=minutesVal;

return str; //returning the struct

}

int main(void)

{

TimeHrMin studentLateness;

int hours;

int minutes;

scanf("%d %d", &hours, &minutes);

studentLateness = SetTime(hours, minutes); //calling the function

printf("The student is %d hours and %d minutes late.\n", studentLateness.hours, studentLateness.minutes);

return 0;

}

Explanation:

4 0
3 years ago
To add a pattern to a page, navigate to the _____ feature.
vfiekz [6]

Answer:

Pattern adding feature

7 0
4 years ago
2. Which of the following does NOT make driving more dangerous at night?
katrin2010 [14]

Answer:

D. THE PRESENCE OF TRAFFIC LIGHTS

Explanation:

THEY HELP GUIDE US AND HELP US BE MORE AWARE OF TRAFFIC.

4 0
4 years ago
Read 2 more answers
Other questions:
  • What are a few benefits of virtualization?<br> How do they benefit ?
    9·1 answer
  • What new information, strategies, or techniques have you learned that will increase your technology skills? Explain why its impo
    7·1 answer
  • Select the correct answer.
    13·1 answer
  • What is the fastest way to locate a record for updating?
    6·1 answer
  • A group of developers for a startup company store their source code and binary files on a shared open-source repository platform
    14·1 answer
  • Question 3
    13·1 answer
  • Outline the dangers arising as a result of using computers​
    12·1 answer
  • Simone needs to add a query for multiple tables in her database. She is using Access 2016. Which tab should she use to add the q
    5·1 answer
  • Current flow is the same through all the elements of a series circuit.<br><br> true or false?
    15·1 answer
  • Why are digital signals an accurate and reliable way to record and send information?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!