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
Y_Kistochka [10]
3 years ago
8

Viết chương trình hoàn chỉnh các yêu cầu sau:

Computers and Technology
1 answer:
Blababa [14]3 years ago
4 0

Explanation:

the perimeter of an aluminium sheet is 120 CM if its length is reduced by 10% and its breadth is increased by 20% the perimeter does not change find the measure of the length and the breadth of the sheet

You might be interested in
A file named 'input.txt' contains a list of words. Write a program that reads the content of the file one word at a time. Check
Margarita [4]

Answer:

// here is code in java.

import java.io.*;

import java.util.Scanner;

class Main{  

    // function to check a word is palindrome or not

 private static boolean is_Palind(String str1)

 {

     // if length of String is 0 or 1

   if(str1.length() == 0 || str1.length() == 1)

   {

     return true;

   }

   else

   {

       // recursively check the word is palindrome or not

     if(str1.charAt(0) == str1.charAt(str1.length()-1))

     {

       return is_Palind(str1.substring(1,str1.length()-1));

     }

     

     else

     {

       return false;

     }

   }

 }

// driver function

 public static void main(String[] args)

 {// variable to store word

   String word;

   // BufferedWriter object

   BufferedWriter buff_w = null;

   // FileWriter object

   FileWriter file_w = null;

   // Scanner object

   Scanner sc = null;

   try

   {

       // read the input file name

     sc = new Scanner(new File("input.txt"));

     // output file

     file_w = new FileWriter("output.txt");

     // create a buffer in output file

     buff_w = new BufferedWriter(file_w);

     

     // read each word of input file

     while(sc.hasNext())

     {

       word = sc.next();

     // check word is palindrome or not

       if(is_Palind(word))

       {

           // if word is palindrome then write it in the output file

         buff_w.write(word);

         buff_w.write("\n");

       }

     }

     // close the buffer

     buff_w.close();

     // close the input file

     sc.close();

   }

   // if there is any file missing

   catch (FileNotFoundException e) {

     System.out.println("not able to read file:");

   }

   // catch other Exception

   catch (IOException e) {

     e.printStackTrace();

   }

 }

}

Explanation:

Create a scanner class object to read the word from "input.txt" file.Read a word  from input file and check if it is palindrome or not with the help of is_Palind() function.it will recursively check whether string is palindrome or not. If it is  palindrome then it will written in the output.txt file with the help of BufferedWriter  object. This will continue for all the word of input file.

Input.txt

hello world madam

level welcome

rotor redder

output.txt

madam

level

rotor

redder

3 0
3 years ago
Which type of collaborative tool allows people to communicate using the
frosja888 [35]
D because people can communicate using video conferencing
7 0
3 years ago
Which data type is most suitable for a password field
Savatey [412]
The String data type is most suitable to define a password field.
8 0
3 years ago
Help my windows pc has a black screen
Alika [10]
Turn it off then turn it back on

6 0
3 years ago
Read 2 more answers
How will a packet tracer environment be affected if a heater is added to a container named branch office and turned on?
viktelen [127]
 <span>Packet Tracer introduced dynamic environent management (temperature, gas, pressure, light, ...) to make IoT device simulation more realistic.</span><span>
If a heater is added to a container named branch office and turned on this will affect the packet tracer environment ins the following way:
</span>The temperature inside Branch Office will increase along with any child containers that exist within Branch Office.
6 0
4 years ago
Other questions:
  • HELP I am in the computer lab right now and I need legit reasons why i should work on a laptop instead of a computer. I dont lik
    5·2 answers
  • How are appointments scheduled in medisoft
    12·1 answer
  • What is the output of the following code fragment? int i = 1; int sum = 0; while (i &lt;= 15) { sum = sum + i; i++; } System.out
    5·1 answer
  • A/an<br> controls the flow of data between a computer and the network.
    8·1 answer
  • They convert energy from the Sun into usable chemical energy by the process of photosynthesis. They are
    11·1 answer
  • How are computers connected to one another?
    5·2 answers
  • Why are people's visions of utopias and dystopias subjective?
    9·1 answer
  • Philp has taken selfie wearing T-shirt that read "California 92." However, the text is mirrored in the selfie. He wants to uploa
    9·1 answer
  • The _____ of a story describes the time and location of a story.
    5·2 answers
  • It is a single strand of metal capable of transmitting power or data from one area to<br> another
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!