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
A client sends seven equal sized segments with sequence numbers 15, 25, 35,45, 55, 65, and 75. Segments with sequence numbers 35
ikadub [295]

Answer: I believe the answer is 6

Explanation: taking 35 and 65 out leaves the rest of the numbers; 15,25,45,55, and 75.

3 0
4 years ago
Frank is preparing a subsection of the SRS document that specifies data formats, data integrity, and storage capabilities. Which
Flauer [41]

The subsection which Frank is preparing for the SRS document that specifies data formats, data integrity, and storage capabilities is Logical Database Requirements.

<h3>What is SRS document?</h3>

SRS document of the software requirement specification document is the document which describes the function of a software and its procedure to perform a particular function.

Different types of requirement-

  • A. External Interface Requirements- This includes the interface of used, such as layout of screen, button etc.
  • B. Design Constraints- This includes the subcomponent of the system, such as performance requirement.
  • C. Inverse Requirements- It defines that what a system can not do.
  • D. Logical Database Requirements- Data of the user are saved in this such as profile, massage,data formats, data integrity, and storage capabilities etc.
  • E. Non-Functional Requirements-This includes attributes of system, performance, security etc.

Frank is preparing a subsection of the SRS document that specifies data formats, data integrity, and storage capabilities.

Thus, the subsection which Frank is preparing for the SRS document that specifies data formats, data integrity, and storage capabilities is Logical Database Requirements.

Learn more about the SRS document here:

brainly.com/question/26161636

#SPJ1

4 0
2 years ago
Write a function named power that accepts two parameters containing integer values (x and n, in that order) and recursively calc
lianna [129]

Answer:

Following are the code to the given question:

int power(int x, int n)//defining a method power that accepts two integer parameters

{

if (n == 0)//defining if block to check n equal to 0

{

return 1; //return value 1

}

else//defining else block

{

x = x * power(x, --n); //use x variable to call method recursively

}

return x; //return x value

}

Explanation:

In the above-given code, a method power is defined that accepts two integer variable in its parameter, in the method a conditional statement is used which can be defined as follows:

  • In the if block, it checks "n" value, which is equal to 0. if the condition is true it will return value 1.
  • In the else block, an integer variable x is defined that calls the method recursively and return x value.
8 0
3 years ago
Please answer this question​
Vanyuwa [196]

Explanation:

A. Encryption. (B. Printer

6 0
3 years ago
Consider the following statement: ptrMemberVarType objectThree(objectOne); The values of the member variables of objectOne are b
MariettaO [177]

Answer: C) Member-wise initialization

Explanation:

 The member wise initialization is the shortest technique for initialize the various properties of the member into new structure. The initial value of the given properties are basically pass by the name to the member wise initialization.

The given statement is the type of value in which the member variable of the object one are copy into the member variable of the object three.

Therefore, this initialization process is basically known as member wise initialization.

 

8 0
3 years ago
Other questions:
  • Computers are said to use binary data because all computer data is simply a series of Os and 1s.
    10·1 answer
  • Which protocol can be used to send ipv6 packets over an ipv4 network?
    5·1 answer
  • When changing the formatting of a spreadsheet to make it more readable, you should use light blue text on a bright blue backgrou
    12·1 answer
  • Paul is playing a game when his computer shuts down unexpectedly. Paul has noticed recently that his fans are running very loud.
    13·1 answer
  • Calculate the change in RGDP if the MPC is .6 and initial spending is $500,000.
    8·1 answer
  • The length property of the String object returns
    15·1 answer
  • I need ideas for a scratch (imagine, share, and program) coding project. You can think of any project you'd like thanks! :)
    10·2 answers
  • Which network component is used to connect one network to another? Which component delivers the message to the destination compu
    5·1 answer
  • As a prospective student, what is the best reason to request an interview with your college application?
    6·1 answer
  • Is a NAS just a collection of hard drives or a computer
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!