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
Ymorist [56]
3 years ago
6

Replace any alphabetic character with '_' in 2-character string passCode. Ex: If passCode is "9a", output is: 9_

Computers and Technology
1 answer:
oksian1 [2.3K]3 years ago
4 0

Answer:

if(isalpha(passCode[0]))

{

passCode[0] = '_';

}

if(isalpha(passCode[1]))

{

passCode[1] = '_';  

}

         

Explanation:

The first if statement uses isalpha() function which checks if the character passed in this function is an alphabet. If the character stored in 0-th position (which is the first position whose index is 0) of the variable passCode is an alphabet then it is replaced with the '_'

The next if statement checks if the second character in the passCode variable is an alphabet. This means the function isalpha() checks if the character stored in second position (index 1) of the variable passCode is an alphabet then it is replaced with the '_'

The  complete activity with this chunk of code added and the output is attached in a screen shot.

You might be interested in
Son opciones de configuración espacio multimedia llamado blog
Softa [21]

NSaAnswer:

th

Explanation:

nks

6 0
3 years ago
What is Groovefunnels?
Andreyy89

GrooveFunnels is a game-changer and it’s disrupting the market quite a bit.
5 0
3 years ago
Read 2 more answers
HURRY PLS
gogolik [260]

Answer:

the testing team

Explanation:

because even though she may have fulfilled the requirements but she still need to test if it runs perfectly or not

7 0
1 year ago
QUESTION
Lady_Fox [76]

Answer:

Explanation:

#include <iostream>

using namespace std;

int main ()

{

   int responses[30],count[6];

   int score = 0;

   string resp = " ";

   for (int i = 0; i < 30; i++)

   {

    responses[i] = 0;

   }

   for (int i = 0; i < 6; i++)

   {

    count[i,1]=0;

    count[i,2]=0;

    count[i,0]=0;

   }

   while ((resp != "Y") && (resp != "y"))

   {

    for (int i = 0; i < 30; i++)

    {

        while ((score > 5) || (score < 1))

           {

            cout << "Student " << (i+1)<< " please enter a value (1-5):";

            cin >> score;

        }

           responses[i] = score;

           if((score > 5)||(score<1))

           {

               if(score==1) count[1]++;        

               if(score==2) count[2]++;        

               if(score==3) count[3]++;        

               if(score==4) count[4]++;        

               if(score==5) count[5]++;        

           }

           score = 0;

    }

    cout<< "Response               Frequency              Percentage"<<endl;;

    cout<< "    1                      "<<count[1]<<"               "<<(count[1]/30)<<"%"<<endl;

    cout<< "    2                      "<<count[2]<<"               "<<(count[2]/30)<<"%"<<endl;

    cout<< "    3                      "<<count[3]<<"               "<<(count[3]/30)<<"%"<<endl;

    cout<< "    4                      "<<count[4]<<"               "<<(count[4]/30)<<"%"<<endl;

    cout<< "    5                      "<<count[5]<<"               "<<(count[5]/30)<<"%"<<endl;

    cout<< "Do you want to exit? Press Y to exit any other key to continue: ";

    cin>> resp;

   }

   return 0;

}

8 0
3 years ago
Cloud computing will offer applications that are _______.
Komok [63]
B. only accesible over the internet
8 0
3 years ago
Read 2 more answers
Other questions:
  • When an architect designs a building, what visual design elements could be used to help capture a viewer’s attention? A) The use
    5·2 answers
  • 25. Becca is learning how to brush her teeth independently and her therapist/RBT has created an activity schedule to help teach
    6·1 answer
  • g Write a program to sort an array of 100,000 random elements using quicksort as follows: Sort the arrays using pivot as the mid
    7·1 answer
  • What is Blender's default save directory for movie AVI files?
    9·2 answers
  • Which of the following commands is more recommended while creating a bot?
    9·1 answer
  • What will be the value of i after the C statements at the right have been executed
    6·1 answer
  • Of the following online activities, identify the TWO that are most likely to be affected by bandwidth quality
    11·1 answer
  • A person's oral communication skills can give either a positive or negative first impression.
    12·1 answer
  • We can create tables in MS. Word from *<br> 2 points<br> Insert Tab<br> Home Tab<br> Mailings Tab
    5·2 answers
  • 3.6 Code Practice Edhesive. (PYTHON LANGUAGE)
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!