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
Eduardwww [97]
3 years ago
13

A palindrome is a string that reads the same both forward and backward. For example, the string "madam" is a palindrome. Write a

program that uses a recursive function to check whether a string is a palindrome. Your program must contain a value-returning recursive function that returns true if the string is a palindrome and false otherwise. Do not use any global variables; use the appropriate parameters.
Computers and Technology
1 answer:
MatroZZZ [7]3 years ago
8 0

// this function will return 1 if the string sent in arguments is palindrome //else it will return 0

int palindrome(int start_of_string, int end_of_string, string &strr)

{

// base case to check if the string is not empty

if (start_of_string>= end_of_string)

   return 1;

if (strr[start_of_string] != strr[end_of_string])

    return 0;

// recursive call

return palindrome(++start_of_string, --end_of_string, strr);    

}

You might be interested in
Explain the working system of computer systems with examples​
geniusboy [140]

,I don't know you all about computer

8 0
2 years ago
Why do employers prefer to hire people with more work ethic?
Andrej [43]

The importance of a good work ethic in school and life. Your good work ethic tells future employers what they might expect from you on the job.

4 0
2 years ago
What device connects a lan's switch to the next network? qizzlets?
laila [671]
I think you can call it to a Network Switch, but LAN is always used device network: Hubs and Switch or maybe Connect Device or Cable.
6 0
2 years ago
Write a program whose input is two integers. Output the first integer and subsequent increments of 10 as long as the value is le
Lubov Fominskaja [6]

Answer:

import java.util.Scanner;

public class TestClock {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Enter two integer numbers");

       int num1 = in.nextInt();

       int num2 = in.nextInt();

       int newSum=num1+10;

       System.out.println("The first number is "+num1);

       do{

          System.out.println(newSum);

          newSum +=10;

       }while (newSum <=num2);

   }

}

Explanation:

Using Java Programming language

  1. Prompt user for the two inputs and save them as num1 and num2(Using the scanner class)
  2. Create a new Variable newSum = num1+10
  3. Create a do...while loop to continually print the value of newSum, and increment it by 10 while it is less or equal to num2
3 0
3 years ago
Pasahot ako plzsss kailangan ko na ngayon ​
goldfiish [28.3K]

Answer:

what language is this

Explanation:

3 0
3 years ago
Other questions:
  • Jim is a forensic specialist. He seized a suspect computer from a crime scene, removed the hard drive and bagged it, documented
    10·1 answer
  • A person painting his house dumps the unused paint on the ground. Which of the following resources will this most likely pollute
    14·1 answer
  • Number 20, can anyone help?
    11·1 answer
  • Determining the Services Running on a Network Alexander Rocco Corporation has multiple OSs running in its many branch offices. B
    10·1 answer
  • What does Al stand for?
    10·1 answer
  • Write the function powersOf3ToN(n) that takes a possibly-negative float or int n, and returns a list of the positive powers of 3
    10·1 answer
  • Write a program named split_me.py that accepts a string in the format Age.FirstName and returns the value FirstName is Age years
    14·1 answer
  • 75 pts. Conduct online research about 10 of the most famous and dangerous computer viruses that threatened computer networks aro
    13·1 answer
  • Program Convert Measurements:
    15·1 answer
  • What do we call the software which programmers use to program?​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!