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]
2 years ago
6

Problem 1: Triple + Double = So Much Trouble

Computers and Technology
1 answer:
damaskus [11]2 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
What is a functional simulation?
Anika [276]
D) a type of training that allows...
4 0
3 years ago
Create a function, return type: char parameters: int *, int * Inside the function, ask for two integers. Set the user responses
iris [78.8K]

Answer and Explanation:

In C programming language:

char fun(int*a, int*b){

printf("enter two integers: ");

scanf("%d%d",a,b);

int e;

printf("please enter a character: ");

e=getchar();

return e;

}

int main(int argc, char *argv[]) {

int d;

int f;

int g;

fun();

printf("%d%d%d", d, f, g);

}

We have declared a function fun type char above and called it in main. Note how he use the getchar function in c which reads the next available character(after the user inputs with printf()) and returns it as an integer. We then return the variable e holding the integer value as char fun() return value.

4 0
3 years ago
How do you change a LAN (local area network) to a WAN (wide-area network)
ahrayia [7]

Answer:

Go to internet, click use as LAN under the cable section and click yes to confirm

4 0
3 years ago
In database systems, the dbms enforces rules about which user can perform which action when. The rules are known as ________.
saw5 [17]

I guess the correct answer is concurrency control

Cοncurrеncy cοntrοl is a databasе managеmеnt systеms (DBMS) cοncеpt that is usеd tο addrеss cοnflicts with thе simultanеοus accеssing οr altеring οf data that can οccur with a multi-usеr systеm.

In database systems, the DBMS enforces rules about which user can perform which action when. The rules are known as concurrency control.

6 0
3 years ago
The annual percentage rate on a credit card determines _______. Athe amount of interest you are charged on credit card purchases
Ostrovityanka [42]
The answer is (a.) The amount of interest you are charged on credit card purchases

The Annual Percentage Rate or APR on your credit card is determined by the interest you made from your purchases for the whole year. APR includes other fees and additional costs.
8 0
3 years ago
Read 2 more answers
Other questions:
  • SP 800-14, Generally Accepted Principles and Practices for Securing Information Technology Systems, provides best practices and
    9·2 answers
  • you install teamviewer on your workstation at home so that you can ac ess it when on the road. how can you be assured that unkno
    9·1 answer
  • A company gives you a document to review. This document lays out the strengths and weaknesses of a proposed business venture. It
    13·1 answer
  • An application needs to calculate sales tax for purchases. You decide to simplify the code by putting the sales tax calculation
    9·1 answer
  • Create a new file that builds a shopping list from a user. There should be a input query that asks the user to list an item and
    11·1 answer
  • How do you know how much space is on the computer
    11·2 answers
  • Several new projects are being staffed by outside contractors who will be working on servers in the contractors’ office, not in
    5·2 answers
  • What does a file association specify?
    10·2 answers
  • Write a program that creates an integer array with 40 elements in it. Use a for loop to assign values to each element of the arr
    5·1 answer
  • Which of these is a possible disadvantage of working with a team?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!