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
Oxana [17]
3 years ago
10

One method of encoding messages is known as the "expanding square code". this method encodes message by placing the character of

the message in an odd order square matrix row by row, and then retrieving them in a clockwise expanding square spiral from the center of the matrix. if the message is not exactly the right length to fill the matrix, the rest of the matrix is filled with asterisk characters (*). for example, the two square matrices below show the order in which the characters are placed in the matrix, and the order in which they are retrieved. notice that the order of retrieval begins at the center, then proceed to the right, and then spirals clockwise order in order out 1 2 3 4 5 21 22 23 24 25 6 7 8 9 10 20 7 8 9 10 11 12 13 14 15 19 6 1 2 11 16 17 18 19 20 18 5 4 3 12 21 22 23 24 25 17 16 15 14 13 message in: "this is a test message!!" message out: "stssees a a*!!egmtithis " your program must be able to encode messages by this method. the input (from standard in) will consist of a string of text entered by the user, containing an unknown number of characters n (0 < n <= 1000). from the length of the message, you should determine the minimum odd order required for the matrix, and perform the specified operation. the output for you program will be the encoded message.
Computers and Technology
1 answer:
mars1129 [50]3 years ago
4 0
Wow!! that is ALOT of info,I dont think i could help with this one Umders 699 maybe someone else can sorry that i couldn`t help :)
You might be interested in
Part1) Given 3 integers, output their average and their product, using integer arithmetic.
Mrac [35]

Answer:

The program is as follows:

#include <iostream>

#include <iomanip>

using namespace std;

int main(){

   int num1, num2, num3;

   cin>>num1>>num2>>num3;

   cout << fixed << setprecision(2);

   cout<<(num1 + num2 + num3)/3<<" ";

   cout<<num1 * num2 * num3<<" ";

   return 0;

}

Explanation:

This declares three integer variables

   int num1, num2, num3;

This gets input for the three integers

   cin>>num1>>num2>>num3;

This is used to set the precision to 2

   cout << fixed << setprecision(2);

This prints the average

   cout<<(num1 + num2 + num3)/3<<" ";

This prints the product

   cout<<num1 * num2 * num3<<" ";

6 0
3 years ago
Explain the difference between "sleep mode" and "shutdown "
kari74 [83]

Answer:

When you shut down your electronic, all your open programs close and the electronic shuts down your operating system. An electronic that's shut down uses almost no power. In sleep mode, the electronic enters a low-power state. The electronics state is kept in memory.

5 0
2 years ago
Nhiệt độ chiết rót của máy chiết rót có van trượt là bao nhiêu
Delvig [45]

Answer:

please translate

Thank you✌️

6 0
2 years ago
The Fast as Light Shipping company charges the following rates. Weight of the item being sent Rate per 100 Miles shipped 2kg or
Pie

Answer:

weight = float(input("Enter the weight of the package: "))

distance = float(input("Enter the distance to be sent: "))

weight_charge = 0

if weight <= 2:

   weight_charge = 0.25

elif 2 < weight <= 10:

   weight_charge = 0.3

elif 10 < weight <= 20:

   weight_charge = 0.45

elif 20 < weight <= 50:

   weight_charge = 1.75

if int(distance / 100) == distance / 100:

  d = int(distance / 100)

else:

   d = int(distance / 100) + 1

   

total_charge = d * weight_charge

print("The charge is $", total_charge)

Explanation:

*The code is in Python.

Ask the user to enter the weight and distance

Check the weight to calculate the weight_cost for 100 miles. If it is smaller than or equal to 2, set the weight_charge as 0.25. If it is greater than 2 and smaller than or equal to 10, set the weight_charge as 0.3. If it is greater than 10 and smaller than or equal to 20, set the weight_charge as 0.45. If it is greater than 20 and smaller than or equal to 50, set the weight_charge as 1.75

Since those charges are per 100 miles, you need to consider the distance to find the total_charge. If the int(distance / 100) is equal to (distance / 100), you set the d as int(distance / 100). Otherwise, you set the d as int(distance / 100) + 1. For example, if the distance is 400 miles, you need to multiply the weight_charge by 4, int(400/100) = 4. However, if the distance is 410, you get the int(400/100) = 4, and then add 1 to the d for the extra 10 miles.

Calculate the total_charge, multiply d by weight_charge

Print the total_charge

3 0
2 years ago
Pleas pleas help and get 99 points with brainliest
storchak [24]
When you copy cells, cell references automatically adjust. But, when you move cells, cell references are not adjusted, and the contents of those cells and of any cells that point to them may be displayed as reference errors. In this case, you have to adjust the references manually.

If the selected copy area includes hidden cells, rows, or columns, Excel copies them. You may have to unhide data temporarily you don't want to include when you copy information.

Hope this helps! I'm not a computer genius though
5 0
3 years ago
Read 2 more answers
Other questions:
  • How fast can the winds blow in a tornado?
    8·2 answers
  • If you are viewing a webpage with customized or regenerated content, such as updated stock quotes, what type of webpage are you
    14·1 answer
  • What aspect of web design is Gloria following when she uses the same color scheme throughout a web page?
    12·1 answer
  • *Please* read before answering.
    14·1 answer
  • Your company has 1,000 users in a Microsoft Office 365 subscription. A Power BI administrator named Admin1 creates 20 dashboards
    14·1 answer
  • A CPU has 32 KB cache, 2-way set associative, 16-byte block size. How many bits are required to use index each set in this cache
    6·1 answer
  • File-sharing utilities and client-to-client communication applications can provide the capability to share files with other user
    14·1 answer
  • WIN
    9·2 answers
  • What are the 2 levels of formatting in a word document
    15·1 answer
  • A bitmap image is provided in two different resolutions. Image 1 has a resolution of 1500 x 1225. Image 2 has a resolution of 50
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!