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
madreJ [45]
3 years ago
6

Problem 1: Triple + Double = So Much Trouble

Computers and Technology
1 answer:
damaskus [11]3 years ago
6 0

Answer:

Explanation:

The program code is written as:

#include <iostream>

using namespace std;

 

int main() {

    int num1,num2,flag=0,flag1=0,flag_val=0,temp1,temp2,f1,f2,f3,m1,m2;

    cout<<"Enter First Number ";

    cin>>num1;

    cout<<"Enter Second Number ";

    cin>>num2;

    temp1=num1;

    temp2=num2;

    while(temp1>0)

    {

    f1=temp1%10;

temp1=temp1/10;

    f2=temp1%10;

    if(f1!=f2)

       continue;

    temp1=temp1/10;

    f3=temp1%10;

       if(f1==f2 && f2==f3)

       {

       flag=1;

       flag_val=f1;

       }

    }

    while(temp2>0)

    {

    m1=temp2%10;

    temp2=temp2/10;

    m2=temp2%10;

    if (m1!=m2)

       continue;

    temp2=temp2/10;

    if(m1==m2 && flag==1 && flag_val==m1)

    {

       flag1=1;

       break;

    }

   

    }

    if (flag1==1)

    {

    cout<<"Both Number Are Triple + Double";

    }

    else

    {

    cout<<"Both number Are not Triple +Double";

    }

 

return 0;

}

OUTPUT:

Enter First Number = 3555761

Enter Second Number = 72559

Both numbers are Triple + DoublePress any key to continue .....

You might be interested in
Please helpppppppppppppppppp please I’m stuck!
Vinvika [58]

do u know thw muffin man

3 0
3 years ago
Which of these actions should be performed on a pc prior to using a windows registry edit utility?
Lady_Fox [76]
Back up the Registry onto a hard drive.

Hope this helped, have a great day! :D
7 0
4 years ago
Write the code to call the function named send_signal. there are no parameters for this function.
nikklg [1K]

<em>*Assuming JavaScript</em>

Answer:

function send_signal() {}

send_signal() // calls the function

Explanation:

3 0
3 years ago
Given the arra
Scrat [10]

Answer: B. hummer

Explanation:

Given the array :

Given the arra

("explorer", "testa", "hummer", "corvette", "civic", "mustang")

Array indexing usually begins from 0

That is ; the first element in the array is indexed as being in position 0

Using the given array as an example :

Index ____ element

0 ______ explorer

1 _______ tester

2 _______hummer

3 _______ corvette

4 _______ civic

5 _______ mustang

Hence, element in index 2 of the array is hummer

4 0
3 years ago
A database is used instead of a spreadsheet when ________.
Ierofanga [76]

Answer:

C. Lists involve data with multiple themes

Explanation:

<em>First of all, it will be beneficial to explain all the concepts involved.</em>

<em />

A spreadsheet is an electronic ledger in which data is arranged in rows and columns of a grid and can be manipulated and used in calculations.

A database can be defined as a structured set of data held in a computer, especially one that is accessible in various ways.

A theme in data storage refers to the subject matter or topic  that categorizes various data sets.

A spreadsheet can be used to store and analyse simple data sets as shown in the options A, B and D. However for option C, a database must be used if it needs to be done accurately.

A data base is more robust than a spreadsheet and can accommodate a lot more diversities in the data sets.

Spreadsheets are built to simplify data analysis, and have their candid limitations - they cannot assure data integrity or consistency when dealing with data of various subject matters.

Lists that involve data with multiple themes can be easily handled with data bases, because data bases specialize in collecting raw data in a tabular form which cannot be formatted. This helps sort out the data into their various themes.

The tables on a database can be programmed to accept a particular theme of data, and nothing else. however, this cannot be done with spreadsheets, as the cells accept the data first before it is formatted to the data type it is. Thus databases help ensure consistency and integrity of the data when dealing with data of multiple themes

5 0
3 years ago
Other questions:
  • What does the Autosum feature on excel do?
    15·1 answer
  • A user is trying to delete a file located on an NTFS volume on his Windows 8 computer but is unable to do so. Why is this?
    11·1 answer
  • Which of the following lists contains the five essential elements of a computer?
    5·1 answer
  • Suppose you have the following declaration.int[] beta = new int[50];Which of the following is a valid element of beta.(i) beta[0
    14·1 answer
  • The following equations estimate the calories burned when exercising (source): Men: Calories = ( (Age x 0.2017) — (Weight x 0.09
    11·1 answer
  • What movie would be greatly improved if it was made into a musical?
    6·1 answer
  • How are gems and precious metals similar?
    6·2 answers
  • 5. The operating system has two components
    12·2 answers
  • HELP PLEASE!!!! If you are continually building, reviewing, correcting a model of your system, and incrementally adding to the s
    9·1 answer
  • A presentation software that is used to organize and present pertinent information using graphics, word processing, outlining, d
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!