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
Most engines will contain how many cylinders in order to maintain a proper balance of weight and forces?
Alika [10]
A. An Even Number is the answer!
4 0
4 years ago
Read 2 more answers
20 points for ez question lol
slega [8]
I think it might be the third on not certain
5 0
3 years ago
Read 2 more answers
Use the following data definitions data myBytes BYTE 10h,20h,30h,40h myWords WORD 3 DUP(?),2000h myString BYTE "ABCDE" What will
Elena-2011 [213]

Answer:

<em>Given Data:</em>

<em>myBytes BYTE 10h, 20h, 30h, 40h </em>

<em>myWords WORD 3 DUP(?), 2000h </em>

<em>myString BYTE "ABCDE"</em>

<em />

Based on the data that we are given we can conclude that:

(a).     a. EAX = 1

         b. EAX = 4

         c. EAX = 4

         d. EAX = 2

         e. EAX = 4

         f. EAX = 8

         g. EAX = 5

8 0
3 years ago
Paul has been working long hours. He is tired and distracted by family issues, so he has not been doing record updates regularly
mina [271]

Answer:

Accidental data loss

Explanation:

Accidental data loss -

It refers to the removal or loss of certain data or information from the computer , due to some accident , is referred to as accidental data loss .

The loss of data can be due to some malicious intruders , or can be due to the fault of the user .

The information can be lost due to sudden power cut , natural calamities like fires , flood earthquake etc. , problem in hard disk etc.

Hence , from the given scenario of the question ,

The correct option is accidental data loss.

4 0
3 years ago
Va rog ajutatima !!!!!!! aicea trebue cu cangorou de facut si cu cit
Alexandra [31]

Answer:

hwhwjbshsjwja jwjwjw

Explanation:

ywgav

4 0
3 years ago
Other questions:
  • The ________ model allows the owner of a resource to manage who can or cannot access the item. Owners maintain this access throu
    8·1 answer
  • Find the maximum value and minimum value in milesTracker. Assign the maximum value to maxMiles, and the minimum value to minMile
    9·1 answer
  • Describe the importance of prioritizing your focus when designing for multiple purpose
    9·1 answer
  • On a pie chart, the different sections or "wedges" show:
    9·1 answer
  • Where would you look to see how much space is available on your c drive?
    8·1 answer
  • Which of the four digital-to-analog conversion techniques is the most susceptible to noise? EXPLAIN WHY.
    6·1 answer
  • Write a program that lets the user play the game of Rock, Paper, Scissors against the computer. The program should work as follo
    15·1 answer
  • Sandra is having difficulty with her reading assignment because she does not fully understand the language. Which online tool wo
    6·1 answer
  • Apply Decision Tree Algorithm on the following data:
    12·1 answer
  • What is the advantage of learning through story compared to learning through personal experience?
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!