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
ICE Princess25 [194]
3 years ago
6

Write a method named isNumericPalindrome that accepts an integer parameter named num. If num is a palindrome the method must ret

urn true. Otherwise the method must return false. You can assume as a precondition that num has exactly 5 digits (i.e. it is between 10000 and 99999.) For example, 12321 is a palindrome while 12231 isn't because it's the same number if reversed. public boolean isNumericPalindrome(int num)
Computers and Technology
1 answer:
yaroslaw [1]3 years ago
4 0

Answer:

Explanation:

The following code is written in Java. It is a method that reverses the number that is passed as an argument and compares it to its original version. Then it finally returns the results of the comparison as a boolean (either True or False). Two test cases have been created and can be seen in the attached image below.

   public static boolean isNumericPalindrome(int num) {

       String numString = Integer.toString(num);

       String reversed = "";

       for (int i = numString.length()-1; i >= 0; i--) {

           reversed += numString.charAt(i);

       }

       return numString.equals(reversed);

   }

You might be interested in
Ninety-two percent of the new information was stored on magnetic media, mostly in _____.
kiruha [24]

Answer:

The answer to the following question is the option "b".

Explanation:

In the computer system, Hard disks stand for the hard disk drive. It is also known as a hard disk. It locates inside the computer case. The hard disk drive is used to store an electromechanical data. That uses magnetic storage device that store and retrieve data. So the answer to this question is hard disks.

5 0
3 years ago
Write a program that generates two 3x3 matrices, A and B, withrandom values in the range [1, 100] and calculates the expression½
Alex

Answer:

#include <bits/stdc++.h>

using namespace std;

int main() {

int A[3][3],B[3][3],res[3][3],i,j;

srand(time(0));//for seed.

for(i=0;i<3;i++)

{

   for(j=0;j<3;j++)

{

   int val=rand()%100+1;//generating random values in range 1 to 100.

   int val2=rand()%100+1;

   A[i][j]=val;

   B[i][j]=val2;

}

cout<<endl;

}

for(i=0;i<3;i++)

{

   for(j=0;j<3;j++)

   {

       res[i][j]=0.5*A[i][j]+3*B[i][j];//storing the result in matrix res.

   }

}

cout<<"Matrix A is"<<endl;

for(i=0;i<3;i++)

{

   for(j=0;j<3;j++)

   {

       cout<<A[i][j]<<" ";//printing matrix A..

   }

   cout<<endl;

}

cout<<"Matrix B is"<<endl;

for(i=0;i<3;i++)

{

   for(j=0;j<3;j++)

   {

       cout<<B[i][j]<<" ";//printing matrix B..

   }

   cout<<endl;

}

cout<<"The result is"<<endl;

for(i=0;i<3;i++)

{

   for(j=0;j<3;j++)

   {

       cout<<res[i][j]<<" ";//printing the result..

   }

   cout<<endl;

}

return 0;

}

Output:-

Matrix A is

13 95 83  

88 7 14  

24 22 100  

Matrix B is

11 13 95  

48 35 20  

68 100 18  

The result is

39.5 86.5 326.5  

188 108.5 67  

216 311 104  

Explanation:

I have created 2 matrices A and B and storing random numbers int the matrices A and B.Then after that storing the result in res matrix of type double to store decimal values also.Then printing the res matrix.

6 0
2 years ago
The seven basic parts of a computer are
True [87]
Monitor, keyboard, CPU, mouse, and I believe the USB drive , DVD drive and hardware system
4 0
2 years ago
Read 2 more answers
Where are my files shortcut in documents folder.
faust18 [17]

Answer: Search File Explorer: Open File Explorer from the taskbar or right-click on the Start menu, and choose File Explorer, then select a location from the left pane to search or browse. For example, select This PC to look in all devices and drives on your computer, or select Documents to look only for files stored there.

Explanation: hope this helps :)

4 0
2 years ago
A computer record is used to store all the information about one transaction, but several such records must be used to store the
never [62]

Answer:

True

Explanation:

A single file can be used to record/ store all the information regarding a transaction because in a transaction there are less complexities. a  simple transaction involves an exchange/communication between a buyer and a seller which involves exchange in finances between the buyer and the seller.  

An employee can be involved in several activities like work activities and multiple transactions while a single inventory part record is different from an employee's record and  any other form of transaction. hence separate files have to be created for each of these activities.

To have an easy access to this information when needed a master file is created to store all the individual files.

7 0
3 years ago
Other questions:
  • It creates an SQL statement to find the project that has the most employees from the same department. If more than one project m
    11·1 answer
  • When programming in Scratch, to make our Sprite walk across the background, in which category would we find the programming bloc
    7·1 answer
  • How can people make sure they are using credit cards responsibly
    14·2 answers
  • If we are using an 4-character password that contains only lowercase English alphabetic characters (26 different characters), ho
    15·2 answers
  • @anthonydboss23<br><br> it’s goldielove6 <br><br> .....this is not a question everyone ignore this
    11·2 answers
  • Which is true about lists and stacks?
    8·1 answer
  • Question # 5
    6·1 answer
  • Where can a client identify the instant deposit options for their QuickBooks Payments account?
    5·1 answer
  • Which element of the MakeCode Arcade interface represents an individual
    12·1 answer
  • Choose the answer.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!