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
KATRIN_1 [288]
3 years ago
13

A palindrome number is a number that remains the same when its digits are reversed. Like 16461, for example, is a palindrome num

ber .Write a Program to generate the Palindrome numbers between 1 and 200 in an output file named "palindrome.txt" .

Computers and Technology
1 answer:
xxMikexx [17]3 years ago
5 0

Answer:

Code is given below and output is attached as an image.

Explanation:

#include <iostream>

#include <fstream>

using namespace std;

bool isPalindrome(int n)

{

       // Find reverse of n

       int rev = 0;

       for (int i = n; i > 0; i /= 10)

               rev = rev * 10 + i % 10;

       // If n and rev are same,then n is a palindrome

       return (n == rev);

}

int main()

{

       int min = 1;        // Lower Bound

       int max = 200;      // Upper Bound

       ofstream myfile;

       myfile.open("palindrome.txt");

       for (int i = min + 1; i < max; i++)

               if (isPalindrome(i))

                       myfile << i << endl;

       myfile.close();

       return 0;

}

You might be interested in
How is binary used in pixels and in sound?
FinnZ [79.3K]

Answer:

Sound needs to be converted into binary for computers to be able to process it. To do this, sound is captured - usually by a microphone - and then converted into a digital signal. The samples can then be converted to binary. They will be recorded to the nearest whole number.

Explanation:

is this it?

3 0
3 years ago
Read 2 more answers
Which of these is the most likely result if the internet download speed in your home is 25 Mbps?
sashaice [31]

Answer:

Streaming movies may stop to buffer

Explanation:

microphones have a set record limit, and games downloaded wont generate errors unless something in the code is wrong, printers don't really need to connect to internet to work except for some, and streaming movies buffer because as you are watching them it downloads the next few minutes.

3 0
3 years ago
You are assigned by your teacher to perform the assembly of all the parts of the computer in preparation for the hands on activi
Alexus [3.1K]

Answer:

answer it yourself or ask your teacker

Explanation:

7 0
2 years ago
These are used to divide the document into sections. *
alekssr [168]

Answer:

Section breaks

Explanation:

The Breaks command, which has several options, inserts section breaks. Section breaks appear as a double-dotted line, and they store formatting instructions such as margins, page size, and page numbering formats for the section above the marker.

5 0
3 years ago
If you have _____, you can evaluate whether information is misleading, biased, or out of date. Group of answer choices informati
Zepler [3.9K]

Answer:

information literacy

Explanation:

8 0
3 years ago
Other questions:
  • Ben buys an Olympus E-PL2 from Sony which starts malfunctioning. When he opts for an exchange, the customer representative says
    11·1 answer
  • You are using a crimper to attach an RJ-45 connector to a Cat 6 UTP cable. You need to use the T568A standard to connect the ind
    6·1 answer
  • What are the most popular/up-and-coming social media applications?
    10·2 answers
  • How to reply to text from unknown number?
    11·1 answer
  • TWO MINUTES LEFT<br> ________ __________ is the physical arrangement of devices on a network.
    9·1 answer
  • Write a for loop that computes the following sum: 5+10+15+20+...+485+490+495+500. The sum should be placed in a variable sum tha
    7·1 answer
  • Which is a benefit of using the paste link option?
    15·2 answers
  • For the recursive method below, list the base case and the recursive statement, then show your work for solving a call to the re
    8·1 answer
  • Which step in the software development life cycle analyzes the scope of work?
    6·1 answer
  • Calculate the time complexity for the following function in terms of Big O notation. Explain your answer.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!