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
timofeeve [1]
3 years ago
12

Sites like Zillow get input about house prices from a database and provide nice summaries for readers. Write a program with two

inputs, current price and last month's price (both integers). Then, output a summary listing the price, the change since last month, and the estimated monthly mortgage computed as (currentPrice * 0.051) / 12 (Note: Output directly. Do not store in a variable.). c
Computers and Technology
1 answer:
qaws [65]3 years ago
3 0

Answer:

Se explaination

Explanation:

/Declaring variables

integer currentPrice

integer lastMonthPrice

integer changeLastMonth

float mortagage

//Reading input

currentPrice = Get next input

lastMonthPrice = Get next input

//Calculating price change

changeLastMonth = currentPrice - lastMonthPrice

//Calculating mortagage

mortagage = (currentPrice * 0.051) / 12

//Printing output

Put "This house is $" to output

Put currentPrice to output

Put "\nThe change is $" to output

Put changeLastMonth to output

Put " since last month." to output

Put "\nThe estimated monthly mortgage is $" to output

Put mortagage to output

You might be interested in
5. Create a variety of test cases focusing on the sorting algorithm, such as the final element is the smallest, the entire set i
andrew11 [14]

Answer:

// C code

// This code will compute the values of the sales ticket sales for concerts

#include <stdio.h>

#define MAXN 100 // max characters in a group/concert name

#define MAXG 50 // max concerts/groups

#define MAXC 3 //max categories

char group [MAXG][MAXN];

int fans [MAXG][MAXC];

float prices [MAXC];

float sales [MAXG];

int count = 0;

void printArray () {

printf ("%15s%5s%5s%5s%10s\n",

"Concert", "s1", "s2", "s3","Sales");

for (int i = 0; i < count; i++) {

printf ("%15s", group [i]);

for (int j = 0; j < MAXC; j++) {

printf ("%5d", fans[i][j]);

} // end for each category

printf ("%10.2f\n", sales [i]);

} // end for each group

} // end function printArray

void computeSales () {

for (int i = 0; i < count; i++) {

sales [i] = 0;

for (int j = 0; j < MAXC; j++) {

sales [i] += prices [j] * fans [i][j];

} // end for each category

} // end for each group

} // end function computeSales

// ***** totalSales ****

void totalSales()

{

float tsales;

for(int i = 0; i <= MAXC; i++){

tsales += sales [i];

}

printf("\n\t\tThe total sales are: $%.2f\n",tsales);

}

// ***********************************

void switchRows (int m, int n) {

char tc;

int ti;

float v;

// printf ("Switching %d with %d\n", m, n);

for (int i = 0; i < MAXN; i++) {

tc = group [m][i];

group [m][i] = group [n][i];

group [n][i] = tc;

} // end for each character in a group name

for (int i = 0; i < MAXC; i++) {

ti = fans [m][i];

fans [m][i] = fans [n][i];

fans [n][i] = ti;

} // end for each fan category

v = sales [m];

sales [m] = sales [n];

sales [n] = v;

} // end switch

int findMinSales (int m) {

float min = sales [m];

int target = m;

for (int i = m+1; i < count; i++)

if (sales [i] < min) {

min = sales [i];

target = i;

} // end new max found

return target;

} // end function findMinSales

void sortBySales () {

int target;

for (int i = 0; i < count; i++) {

target = findMinSales (i);

if (target > i)

switchRows (i, target);

} // for each concert

} // end function sortBySales

//**********sort by fans*************

int minFans (int b) {

float min = fans [b][0];

int target = b;

for (int i = b; i < count; i++)

if (fans [i][0] < min) {

min = fans [i][0];

target = i;

} // end new max found

return target;

}

void sortByFans () {

int target = 0;

//int result;

 

for (int i = 0; i < count; i++) {

target = minFans(i);

if (target > i)

//result = target;    

switchRows (i,target);

 

}

}

//********************************

void getData () {

// for (int i = 0; i < MAXG; i++) sales [i] = 0;

printf ("\nEnter ticket prices in each of %d cateogories: ", MAXC);

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

scanf ("%f", &prices [i]);

printf ("-- Enter group and fans in %d categories\n", MAXC);

printf (" . to finish entries:\n");

for (int i = 0; i < MAXG; i++) {

scanf ("%s", group[i]);

if (group [i][0] == '.')

break;

count++;

for (int j = 0; j < MAXC; j++)

scanf ("%d", &fans[i][j]);

} // end for each group

} // end function getData

int main(void) {

getData ();

computeSales ();

printArray ();

printf ("\n --- Sorted sales ---\n");

sortBySales ();

printArray ();

totalSales ();

printf("--- sorted by fans ---\n");

sortByFans ();

printArray ();

totalSales ();

printf("\t\t ... Bye ...\n");

return 0;

}

7 0
3 years ago
Write a lottery program that will ask the user if they would like to pick 5 numbers (1-30) or if they would like to choose EZ Pi
Llana [10]

Answer:

Explanation:

The following code is written in Python and creates arrays for the user's numbers and the next chance numbers, it also creates a cost variable and a did_you_win variable. The function takes in the winning numbers as an array parameter. It asks all the necessary questions to generate data for all the variables and then compares the user's numbers to the winning numbers in order to detect if the user has won. Finally, it prints all the necessary information.

import random

def lottery(winning_numbers):

   user_numbers = []

   next_chance_drawing = []

   cost = 0

   did_you_win = "No"

   #print("Would you like to choose your own 5 numbers? Y or N")

   answer = input("Would you like to choose your own 5 numbers? Y or N: ")

   if answer.capitalize() == "Y":

       for x in range(5):

           user_numbers.append(input("Enter number " + str(x+1) + ": "))

   else:

       for x in range(5):

           user_numbers.append(random.randint(0,31))

           cost += 1

   next_chance = input("Would you like to enter a Next Chance drawing for $1.00? Y or N: ")

   if next_chance.capitalize() == "Y":

       for x in range(4):

           next_chance_drawing.append(random.randint(0, 31))

           cost += 1

           

   if user_numbers == winning_numbers or next_chance_drawing == winning_numbers:

       did_you_win = "Yes"

   print("User Numbers: " + str(user_numbers))

   print("Next Chance Numbers: " + str(next_chance_drawing))

   print("Cost: $" + str(cost))

   print("Did you win: " + did_you_win)

6 0
2 years ago
High Frequency Traders are
Alex73 [517]

Answer:

Firms that use high-speed computers and communications networks to execute millisecond trades for themselves

Explanation:

High Frequency traders are different entities that take part in the market that use powerful computers to be able to be fast at answering to news and have a big number of trades. These traders use advance tools to evaluate the markets and anticipate trends quickly to obtain profits from the trades they make. According to this, the answer is that High Frequency Traders are Firms that use high-speed computers and communications networks to execute millisecond trades for themselves.

7 0
3 years ago
Is the wireless network you own as secure as it should be? Examine your wireless network or that of a friend or neighbor and det
AleksandrR [38]

Answer:

See explaination

Explanation:

Wireless Security:

In a bid to examine the network you can use ipconfig /all command in windows or in the event where you are a linux user type in ifconfig to view all the configuration details of your network such as

indows IP Configuration

Host Name . . . . . . . . . . . . : myvpc-hb

Primary Dns Suffix . . . . . . . : example.com

Node Type . . . . . . . . . . . . : Hybrid

IP Routing Enabled. . . . . . . : Yes

Ethernet adapter Local Area Connection:- - - - - -

Connection-specific DNS Suffix . :- - - - - -

Description . . . . . . . . . . : Intel 68540-Based PCI Express Fast Ethernet Adapter

Physical Address. . . . . . . . . : 00-03-AA-BC-CA-8F

Autoconfiguration Enabled . . . . : Yes

Link-local IPv6 Address . . . . . : fe65::ab56:ccb9:320c:524d%8(Preferred)

IPv4 Address. . . . . . . . . . . : 192.168.45.111(Preferred)

Default Gateway . . . . . . . . . : 192.168.15.1

DHCP Server . . . . . . . . . . . : 192.168.15.1

DHCPv6 IAID . . . . . . . . . . . : 201327615

Note: If you want to deeply examine the your network and to find security model go with Wireshark application.It will help you to capture the data packets easily using GUI.Also it will provide other details like transmission control protocols,etc.

To take your network to highest level i.e. to make it more secure you can use:

1.Firewalls like application gateways,packet filtering,hybrid systems.

2.Crypto cable routers

3.Virtual private networks, etc.

Estimation of cost and the time to increase the level is solely depends on the type of the architecture you want to use for the network building structure.Also the size of the network will be responsible for the cost and time.

In case of any attack on your computer it depends on the size of the data on the computer disc and the bandwidth of the network to which your computer is connected to replace all data. The faster the bandwidth of the network,faster the data replacement rate.

3 0
3 years ago
Which of the following likely comes last in developing a presentation outline
kari74 [83]
So in developing a presentation outline, the first thing that we are going to do is to introduce what it is all about. This means that the main points come first. After the main points, follow the sub points. The sub points serve as the explanation of the main points. After the sub points are the illustrations and examples. These are already the specifics which support the sub points and the main points. Therefore, the answer is A.
8 0
3 years ago
Read 2 more answers
Other questions:
  • At regular intervals the AP in an infrastructure network or wireless device in an ad hoc network sends a ____ frame both to anno
    8·1 answer
  • One of the earlier applications of crypto-graphic hash functions was the storage of passwords to authenticate usersin computer s
    13·1 answer
  • How do online note-taking tools support students’ academic goals? Check all that apply.
    9·2 answers
  • A ________ is a material deficiency, or combination of significant deficiencies, that results in more than a remote likelihood t
    6·1 answer
  • Match the keyboard shortcuts to the function they perform
    10·1 answer
  • Which element is included in the shot breakdown storyboard? Which element is included in the shot breakdown storyboard?
    8·1 answer
  • What is the point of brainy when other people have to answer your questions but not the cumputer
    9·1 answer
  • In C complete the following:
    12·1 answer
  • Essay about evolution of media shaped the values and norms of the society
    11·1 answer
  • The designers of a database typically begin by developing a​ __________ to construct a logical representation of the database be
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!