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
umka2103 [35]
3 years ago
12

Write a method that determines the total number of chars in each string of an array.

Computers and Technology
1 answer:
Serjik [45]3 years ago
8 0
The total number of chars in each string is basically the size of each string.

Using JAVA:

        String[] arr = {"hello", "my", "name", "is", "Felicia"};                int count = 0;        for(int i = 0; i < arr.length; i++) {            count = count + arr[i].length();            System.out.println("Characters in " + arr[i] + ": " + count);        }

Output: 
<span>Characters in hello: 5
Characters in my: 7
Characters in name: 11
Characters in is: 13
Characters in Felicia: 20</span>


You might be interested in
A campfire is a good source of heat and light on a cool night. The energy that is released when firewood is burned comes from th
Makovka662 [10]
Chemical reactions in the material used to make matches, and the cardboard... so hope this helps :)

NOTE: im not to good at this stuff so i rlllllly hope it helps























































3 0
3 years ago
What type of application would be appropriate for learning a foreign language?
Marysya12 [62]

Answer:

Education

Explanation:

Most apps for <u>learning</u> a new language are for educational purposes and are most likely an education type of app.

7 0
3 years ago
Read 2 more answers
Ask the user to input their grade percentage (e.g. the use will enter 98 if they had an overall grade of 98% in their course) fo
Airida [17]

Answer:

In Python

def getpointValue(subject):

   if subject >= 75:        point = 4; grade = 'A'

   elif subject >= 60:        point = 3; grade ='B'

   elif point >= 50:        point = 2; grade = 'C'

   elif point >= 40:        point = 1; grade = 'D'

   else:        point = 0; grade = 'F'

   return point,grade

subjects= ["Accounting","Marketing","Economics","MIS"]

acct = int(input(subjects[0]+": "))

mkt = int(input(subjects[1]+": "))

eco = int(input(subjects[2]+": "))

mis = int(input(subjects[3]+": "))

acctgrade = getpointValue(acct)

print(subjects[0]+" Grade: "+str(acctgrade[1]))

mktgrade = getpointValue(mkt)

print(subjects[1]+" Grade: "+str(mktgrade[1]))

ecograde = getpointValue(eco)

print(subjects[2]+" Grade: "+str(ecograde[1]))

misgrade = getpointValue(mis)

print(subjects[3]+" Grade: "+str(misgrade[1]))

totalpoint = (acctgrade[0] + mktgrade[0] + ecograde[0] + misgrade[0]) * 3

gpa = totalpoint/12

print("GPA: "+str(gpa))

Explanation:

<em>The solution I provided uses a function to return the letter grade and the point of each subject</em>

<em>I've added the explanation as an attachment where I used comment to explain difficult lines</em>

<em />

Download txt
6 0
3 years ago
I need help. People who know computer science. I have selected a word from the first 1000 words in my dictionary. Using the bina
Rudiy27

Answer:

14

Explanation:

8 0
3 years ago
Which of the following data types can hold a fractional (decimal) number?
zvonat [6]
A float data type can hold a decimal number.
6 0
2 years ago
Other questions:
  • Finally, Su uses the last slide of her presentation as a summary slide. She wants to make sure the text she types automatically
    12·2 answers
  • Rags or wipes are considered non-hazardous waste when they are
    15·2 answers
  • Your friend sees an error message during Windows startup about a corrupted bootmgr file. He has another computer with a matching
    12·1 answer
  • Which of the following attributes of a website indicates a more reliable source for information?
    8·1 answer
  • Create the SQL statements for displaying the results for each of the following scenarios in the Academic Database. Save these st
    13·1 answer
  • Truck drivers probably can't see your vehicle if ______________.
    11·2 answers
  • Write a program that reads from the user any three points in two dimensional space: x1, y1, x2, y2, x3, y3. Assume these points
    13·1 answer
  • Drag the tiles to the correct boxes to complete the pairs.
    13·1 answer
  • HELLO!!!! For instance, will we get an error if we put a space after the word “print” and before the opening parenthesis in pyth
    9·1 answer
  • How does computer number system play a Vital role in a computer calculation. ​
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!