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
ddd [48]
2 years ago
14

c++ 4.17 LAB: Count characters Write a program whose input is a character and a string, and whose output indicates the number of

times the character appears in the string. The output should include the input character and use the plural form, n's, if the number of times the characters appears is not exactly 1. Ex: If the input is: n Monday the output is: 1 n
Computers and Technology
1 answer:
Nata [24]2 years ago
5 0

Answer:

#include <iostream>

using namespace std;

int main() {

   int n = 0;

   char c;

   string str;

   cin >> c >> str;

   for (int i = 0; i < str.length(); ++i)

       if (c == str[i]) n++;

   cout << n << " n" << (n > 1 ? "'s" : "");

   return 0;

}

Explanation:

Declares variables n, c, and str.

Next a loop lets count number of character c in string str.

Finally, answer is showing.

You might be interested in
Wireshark capture files, like the DemoCapturepcap file found in this lab, have a __________ extension, which stands for packet c
grin007 [14]

Answer:

The answer is ".pcapng"

Explanation:

Wireshark format includes a "dump" with data packets, which is collected over a channel and sometimes a common folder to store, that data in the PCAP Next Iteration file system.

  • The .pcapng stands for the file system, this file system compatible with the recorded data transmission packet. It includes several data blocks.
  • It is quite robust, but it should not be helped by the other devices. Wireshark allows the libpcap system as well.
5 0
3 years ago
Match each vocabulary word to its definition.
Nana76 [90]

Answer:

Column matching given in explanation

1. Intranet :  <em>a network of computer within an organization</em>

2. Placeholder: <em>an empty area that reserves space for new content</em>

3. Presentation: <em>information delivered to an  audience</em>

4: Presentation Technology:  <em>a software application that helps  organize and convey information</em>

5. Keynote:   <em>the main speech delivered to all in attendance</em>

Explanation:

Intranet:

A small network that exist in the small organization or company to connect all the computers in organization.

Placeholder:

In computer programming, few variables has been defined in the start of program. These variables have no value initially but can be utilized at the time of need. These variable holds some space in memory that is called Placeholder.

Presentation:

A piece of information relevant to some particular topic, which will be delivered to a particular audience is called presentation.

Presentation Technology:

The tools that are used to assist presentation such as projector, slides, boards etc. are called presentation technology.

Keynote:

The main idea of speech that presenter want to deliver to the audience is called Keynote.

4 0
2 years ago
Write a program that asks the user to enter an object’s mass, then calls a // function to return the object's weigh in newtown.
lisov135 [29]

Answer:

import java.util.Scanner;

public class num8 {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Enter the mass");

       double mass = in.nextDouble();

       double weight = calWeight(mass);

       System.out.println("The weigth is "+weight);

   }

   static double calWeight(double mass){

       double weight = mass*9.80665; // assume a = accelation due to gravity = 9.80665N

       if(weight>500){

           System.out.println("Too Heavy");

       }

       else if(weight<100){

           System.out.println("Too Light");

       }

       return weight;

   }

}

Explanation:

  • Using Java programming language
  • The main method is created to request and store a variable, mass in kilogram. The main method call calWeight() and passes the value for mass
  • A method calWeight() is created that calculates the weight in newtons (mass * 9.8).
  • The method checks if the weight is greater than 500 (prints too heavy) if less than 100(prints to light)
  • Returns the weight  

4 0
3 years ago
The human resource department at Mega Corporation is overwhelmed with a constant flood of résumés submitted through its website
ad-work [718]

Answer: The answer to the question, How might an applicant-tracking system help the department; is pretty simple. What this question really asks for is to explain the innovation of the Applicant Tracking System (commonly abbreviated as ATS). So the foremost thing to do is to describe the Applicant tracking system. Application tracking tracking systems (ATS from hereon), are digital systems that are designed to make the recruitment process for employers way less tedious than it normally should be. Imagine you had to hire for a huge company like Microsoft that could receive tens of thousands of applications everyday for a specific role. It would be pretty tedious to determine the most qualified for the role if you had to go through all the applications yourself. Even if you had a team of people, it would still be stressful and error prone because, as humans we can make mistakes and slip in the wrong file for an interview or even misplace an application or mix something up somewhere. Now imagine if you didn't have to do all that because a computer program can do it with more precision and speed than you and your whole team are capable of. That would be splendid, right? Well, you don't have to. Aanya in the question above does not have to bother the department with the tedious work. The ATS will take care of a good chunk of the work. Here's how it works. The ATS is comprised of bots that are programmed to scan through applications and arrange them in order of qualification and matching of requirements. A bot is software application that's preset to run programs automatically, usually over the internet. So when people apply on Mega Corporation's platform, the applications are sent through to the scanning of the ATS. Now the requirements for the job role will be filled in by the department ATS so it knows what it's looking out for. For example, if one of the requirements for the job is a Master's degree in Psychology, applications without Master's degrees will be grouped separately from those that have. Same thing for other criteria like years of experience, Age, etcetera. The ATS receives all these applications and groups them such that, at the deadline of the application process, the ATS would have screened a good portion of the applicants and only the most qualified would be left for the next stage of screening. This is how the Applicant Tracking System would help the Human Resource department at Mega Corporation.

7 0
3 years ago
There’s only one granola bar left out of the pan of 10 bars if Will and Rachel decide to split the last granola bar what fractio
maks197457 [2]
Do not know about the beachfront
the last bar is 1/10    half of that is 1/10  x 1/2   which equals   1/20
8 0
2 years ago
Other questions:
  • What is a URN (include example)
    13·1 answer
  • Please help! (I cant figure out)
    13·1 answer
  • HURRY UP !!!!!!’<br> Each packet is addressed to the recipient's .
    8·1 answer
  • What is the value of variable num after the following code segment is executed?
    5·1 answer
  • Pick the simplest line of code to test if the word "BASIC" is stored in the variable text1.
    12·1 answer
  • Suppose that we pick the following three tuples from a legal instance of a relation S (S has 100 tuples in total). Relation S ha
    9·1 answer
  • Each row in a database is a set of unique information called a(n)
    8·2 answers
  • Which of the following is an example of joint problem solving?
    12·1 answer
  • Recently mobile phones have been used to pay for goods in stores and supermarkets. One method
    11·1 answer
  • Which of the following is the system of rules and structure governing
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!