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
I am Lyosha [343]
3 years ago
15

When the condition of an if statement is false, the computer will return an error message to the user.

Computers and Technology
2 answers:
Lisa [10]3 years ago
7 0
The correct answer to your problem is A, True
sp2606 [1]3 years ago
6 0
True is the correct answer
You might be interested in
8.11 LAB: Count characters - functions Write a program whose input is a character and a string, and whose output indicates the n
Shkiper50 [21]

Answer:

#include<iostream>

using namespace std;

int CountCharacters(char userChar, const string inputstr){

   int k = 0;

   int iter = 0;

   for (iter = 0; iter < inputstr.size(); iter++){

       if (inputstr[iter] ==  userChar){

           ++k;        }}

   return k;}

int main(){

   string str;

   char userChar[1];

   cout<<"Char: ";    cin>>userChar;

   cin.ignore();

   cout<<"String: ";   getline(cin, str);

   cout<<CountCharacters(userChar[0],str);

   return 0;}

Explanation:

Written in C++:

The function is defined here:

int CountCharacters(char userChar, const string inputstr){

This initializes a count variable k to 0

   int k = 0;

This initializes an iterating variable iter to 0

   int iter = 0;

This iterates through the characters of the string being passed to the function

   for (iter = 0; iter < inputstr.size(); iter++){

This checks for matching characters

       if (inputstr[iter] ==  userChar){

If found,  k is incremented by 1

           ++k;        }}

This returns the total count

   return k;}

The main begins here

int main(){

This declares a string variable

   string str;

This declares a character variable

   char userChar[1];

This gets input for the character variable

   cout<<"Char: ";    cin>>userChar;

This lets the user get another input

   cin.ignore();

This gets input for the string variable

   cout<<"String: ";   getline(cin, str);

This calls the function and return the count of character in the string

   cout<<CountCharacters(userChar[0],str);

6 0
3 years ago
Plzzz help! It’s due soon and I can’t figure it out
nignag [31]

Answer:

The answer is A or the first option.

Explanation:

3 0
3 years ago
the part of the computer that provides access to the internet is the A.modem B. keyboard C. monitor or D.system unit
marta [7]
A. the modem provides the wifi or internet to the computer
6 0
3 years ago
Read 2 more answers
What is the most important external issue when using social media in emergency management?
DerKrebs [107]
Th e most important external issue when using social media in emergency management is the disaster response. Disseminating information through social media is very effective especially when there are calamities and a disaster respond from both private and public sector is very urgent.
8 0
3 years ago
TRUE OR FALSE!!!!!
VladimirAG [237]
The answer is True.
6 0
3 years ago
Read 2 more answers
Other questions:
  • Write a function called ReverseLetters that takes an input phrase consisting of a single word and reverses the sequence of lette
    15·1 answer
  • Write a program to input money in cents from user, example 12745 and display the one dollar bills and the cents. Submit source c
    12·1 answer
  • A(n ________ is a program that is used to create, process, and administer a collection of self-describing integrated records.
    14·1 answer
  • What is a 'balanced' dfd?
    5·1 answer
  • How is it possible to find encyclopedias and reference texts on the internet
    11·2 answers
  • Works in the public domain have copyright that are expired or abandoned true or false
    5·1 answer
  • What pointer appears when pointing to a hyperlink?
    9·1 answer
  • Two technicians are discussing a parasitic load test. Technician A says that the parasitic load is measured with an ammeter Tech
    13·1 answer
  • Write a procedure named Read10 that reads exactly ten characters from standard input into an array of BYTE named myString. Use t
    15·1 answer
  • The User Datagram Protocol (UDP) is called the connectionless protocol because: It does not attempt to fix bad packets but resen
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!