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
weqwewe [10]
3 years ago
6

Simple Arithmetic Program

Computers and Technology
1 answer:
kompoz [17]3 years ago
7 0

Answer:

Written in Java

import java.util.*;

public class Project01{

public static void main(String[] args) {

 Scanner input = new Scanner(System.in);

 int num1,num2;

 System.out.print("Enter first number: ");

 num1 = input.nextInt();

 System.out.print("Enter second number: ");

 num2 = input.nextInt();

 System.out.println(num1+" + "+num2+" = "+(num1 + num2));

 System.out.println(num1+" - "+num2+" = "+(num1 - num2));

 System.out.println(num1+" * "+num2+" = "+(num1 * num2));

 System.out.println(num1+" / "+num2+" = "+(num1 / num2));  

 System.out.print("The average of your two numbers is: "+(num1 + num2)/2);

}

}

Explanation:

import java.util.*;

public class Project01 {

public static void main(String[] args) {

Scanner input = new Scanner(System.in);

This line declares myfirstnum and mysecnum as integer

 int myfirstnum,mysecnum;

This line prompts user for first number

 System.out.print("Enter first number: ");

This line gets user input

myfirstnum= input.nextInt();

This line prompts user for second number

 System.out.print("Enter second number: ");

This line gets user input

 mysecnum = input.nextInt();

This line calculates and prints addition operation

 System.out.println(myfirstnum+" + "+mysecnum+" = "+(myfirstnum + mysecnum));

This line calculates and prints subtraction operation

 System.out.println(myfirstnum+" - "+mysecnum+" = "+(myfirstnum - mysecnum));

This line calculates and prints multiplication operation

 System.out.println(myfirstnum+" * "+mysecnum+" = "+(myfirstnum * mysecnum));

This line calculates and prints division operation

 System.out.println(myfirstnum+" / "+mysecnum+" = "+(myfirstnum / mysecnum));  

This line calculates and prints the average of the two numbers

 System.out.print("The average of your two numbers is: "+(myfirstnum + mysecnum)/2);

}

}

You might be interested in
Walking paths across the part is represented by the equation why equals -4x - 6​
Setler79 [48]

Answer:

I believe this is a graph question which would be impossible to do on brainly. Butttt, if so, -4x means you would go to the right 4, and the 6 means you would go up 6

Hope this helps:)

if you want to further explain question I'd be glad to help :))

5 0
3 years ago
_____ serves as a foundation for comparison or measurement.
sammy [17]

Answer: C

Explanation: Baseline is the starting point or used for comparison or measurement.

6 0
3 years ago
You are asked to assume the role of an employee of the DigiFirm Investigation Company. As part of its community outreach effort,
kirill [66]

Answer:

1.  To trace an email we need to examine the header part of the email. By examine the header of an email we could extract the sender, subject and other important credentials related to that email.  

2. The command to trace the email id is “whois” command.

 First open the email client and find the IP address of the received email that need to be traced.  The command “whois” IP address gives the registration information of that IP address.

 3.  Reverse address/email search is the procedure used by the experts to find the origin or the ownership of the email.  Rather than tools websites are more use full in the reverse address search.

http://reverse.addresssearch.com, www.iplocation.net, etc. are good to find the ownership of an email.

4. We need to set up mail server to send, receive and to explore various activities associated with an email.  The other related purpose servers like SMTP server, HTTP server , etc are also required to assist large organizations.  The mail server can be a stand-alone computer or a collection of computer and servers.

 5.  The executable files should be examined thoroughly in the server, it can be dangerous malwares.  The examination is mainly done by scanning for malicious words and sender address.  Since many mail providers does not allow executable files to send, so the attackers are using other files also as a carrier of the malwares, so now every emails should be subject to deep examination using some malware scanner.  

6.   By the time of examination the some of the legitimate mails may also come under the suspect list so further check is needed there.  At the same time the attacks can be from legitimate sources also this could be go un-noticed; this should be also a challenge to face in the stage of e-mail examination.

8 0
3 years ago
Which feature is an interface between the user and the file system of a computer?
denis23 [38]
That would be the GUI or <span>graphical user interface. Hope this helps and have a nice day!

</span>
8 0
3 years ago
Read 2 more answers
Pleaseeeee help <br> Can HTML be used to create a complicated mobile application? <br> True or false
puteri [66]
Yes but the caliber of code required is inefficient compared to other languages.
5 0
3 years ago
Read 2 more answers
Other questions:
  • Spencer is a recent graduate who finds a dream car that costs $45,000. Even better, there's a 0% APR for 36 months offer from th
    13·1 answer
  • How to find the biggest files on your computer?
    10·1 answer
  • The benefits associated with software reuse are lower cost, better quality,
    9·1 answer
  • Is a trade group that promotes wireless technology and owns the trademark for the term “wi-fi”
    5·2 answers
  • Question #4
    5·2 answers
  • Type the correct answer in each box. Spell all words correctly.
    6·1 answer
  • Important tools used in the _____ phase of the DMAIC process include a project charter, a description of customer requirements,
    10·1 answer
  • To what extent is cyberbullying experienced across the world?
    9·1 answer
  • While in class you were introduced to the varieties
    7·1 answer
  • is a programming model that focuses on an application's components and data and methods the components use. Group of answer choi
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!