Visual Basic Help:
Code a program that reads a test score (number) from a text-box, each time a button is clicked. In other words, every time a new score is entered in the text-box, the score should be taken by the program, stored and the text-box should be cleared, so that the user can enter a new score. The program should be able to check that the user is entering a number. If the user enters something different than a number (or leaves the text-box empty), the program should not continue and it should display a warning message to the user. After entering as many scores as wanted, the user should be able to click on a second button to display the two highest scores, among all the ones entered until that point. The program should also display the total number of scores entered by the user. Also, once the user clicks on the button to display the results and the results are displayed, the program should get ready to get a new set of scores and start again. If the user starts writing a new score, the text-boxes with the results should be cleared.
Example: Assume the user enters the following scores: 10, 5, 20. The scores are entered once at the time in the top text-box; when a score is entered, the user presses the button to "Read" the score. The score is taken by the program and the text-box is cleared, so that the next score can be entered. This process can be repeated as many times as the user wants and for as many scores as the user wants. Once all the scores are entered and read(or taken-in)by the program, the user clicks on the second button to display the results. The program should then display the two highest scores, among the ones entered. So, in the example, this would be 10, 20. And it should display the total number of scores entered by the user. In the example, it would be 3.
After that, the user should be able to repeat the process and enter a new set of scores, if wanted. The program should therefore be ready to take in new inputs and start the process again. When the user starts typing the new score, the text-boxes with the previous results (two highest scores and total num. of scores) should get cleared

Answers

Answer 1

Answer:

See text attachment for complete source code (for the answer) where I used comments to explain each line of the program

Explanation:

First, design the form using the following tools (and the accompanying properties) :

1 Label: Property: Text: Score

2 Buttons

Button1: Property: Name: btnAdd; Text: Add

Button2: Property: Name: btnDisplay; Text: Display

1 ListBox: Property: Visible: Hidden

1 TextBox: Property: Name: txtNum1

First, create the following function.

The function (named typecheck) validates input from the user (i.e. integer input only)

Function typecheck(ByVal input As String) As Boolean

       Try

           Convert.ToInt32(input)

           [tex]Return\ True[/tex]

       [tex]Catch\ ex\ As\ Exception[/tex]

           [tex]Return\ False[/tex]

       End Try

   End Function

It returns true if the input is integer and false, if otherwise.

Next, double-click on the "Add" button and write the following lines of code:

Dim num1 As String

       num1 = txtNum1.Text

       If num1 IsNot String.Empty Then

           If typecheck(num1) Then

               [tex]ListBox1.Items.Add(num1)[/tex]

               [tex]txtNum1.Text = String.Empty[/tex]

           Else

               [tex]MsgBox("Only[/tex] [tex]Integer[/tex] [tex]Inpu t")[/tex]

               [tex]txtNum1.Text = String.Empty[/tex]

           [tex]End\ If[/tex]

       Else

           [tex]MsgBox("Box[/tex] [tex]can\ not\ be\ empty")[/tex]

           [tex]txtNum1.Text = String.Empty[/tex]

       [tex]End\ If[/tex]

Next, double-click on the "Display" button and write the following lines of code:

If ListBox1.Items.Count > 0 Then

           [tex]Dim\ max1, max2\ As\ Integer[/tex]

           max1 = Convert.ToInt32(ListBox1.Items(0))

           max2 = Convert.ToInt32(ListBox1.Items(0))

           [tex]For\ count\ = 0\ To\ ListBox1.Items.Count - 1[/tex]

               If Convert.ToInt32(ListBox1.Items([tex]count[/tex])) >= max1 Then

                   max1 = Convert.ToInt32(ListBox1.Items([tex]count[/tex]))

               [tex]End\ If[/tex]

           Next

           [tex]For\ count\ = 0\ To\ ListBox1.Items.Count - 1[/tex]

               If Convert.ToInt32(ListBox1.Items([tex]count[/tex])) >= max2 And Convert.ToInt32(ListBox1.Items([tex]count[/tex])) < max1 Then

                   max2 = Convert.ToInt32(ListBox1.Items([tex]count[/tex]))

               [tex]End\ If[/tex]

           Next

           MsgBox("Highest Scores: " + max1.ToString() + " " + max2.ToString())

           MsgBox("[tex]Total[/tex]: " + ListBox1.Items.Count.ToString())

       [tex]End\ If[/tex]

       ListBox1.Items.Clear()

Visual Basic Help:Code A Program That Reads A Test Score (number) From A Text-box, Each Time A Button
Visual Basic Help:Code A Program That Reads A Test Score (number) From A Text-box, Each Time A Button

Related Questions

In the early days of the Internet, most access was done via a modem over an ________.
Question 10 options:

Analog telephone line

Fax

Telegram

None of the above

Answers

Answer:

analog telephone line

Explanation:

I hope this helps! :)

☁️☁️☁️☁️☁️☁️☁️☁️☁️

1. What is friend function and friend class? Class “stu-info” stores all the details related to students like (name, reg, section , marks of 5 subjects). Class “show_details” will act like a friend of class “stu-info” and perform following operations: basic_details() and result(). These functions will work on the private data members of “stu-info”.

Answers

Answer:

banksjakjajbsjsishbsjso sjjsnsjsjsksk hsjsnks jsjsjsbsh jebsjjsjsbdhdjej

Explanation:

nsnkwjejev s hejej eje eiebjdbdibe sjeb


Using the Impress program, you can add multimedia files, including audio, image, and video files, to the presentation
by using
the Insert menu.
the Media menu.
the Edit menu.
the Add menu.
Mark this and return

Answers

Answer:

A. The Insert Menu

Explanation:

:)

Answer:

Edit menu

Explanation:

You are working with a client who wants customers to be able to tap an image and see pricing and availability. As you are building the code in Java, what will you be using?


graphical user interface

icon public use

graphical public use

icon user interface

Answers

Answer:

A. Graphical user interface

Explanation:

In Java the graphical user interface is what manages interaction with images.

Answer: A.)

Explanation:

The answer is A because

I was born to rule the world

And I almost achieved that goal

(Giovanni!)

But my Pokémon, the mighty Mewtwo,

Had more power than I could control

(Giovanni!)

Still he inspired this mechanical marvel,

Which learns and returns each attack

(Giovanni!)

My MechaMew2, the ultimate weapon,

Will tell them Giovanni is back!

There'll be world domination,

Complete obliteration

Of all who now defy me.

Let the universe prepare,

Good Pokémon beware,

You fools shall not deny me!

Now go, go, go, go!

It will all be mine,

Power so divine

I'll tell the sun to shine

On only me!

It will all be mine,

Till the end of time

When this perfect crime

Makes history

Team Rocket! This is our destiny!

Listen up, you scheming fools,

No excuses, and no more lies.

(Giovanni!)

You've heard my most ingenious plan,

I demand the ultimate prize

(Giovanni!)

Now bring me the yellow Pokémon

And bear witness as I speak

(Giovanni!)

I shall possess the awesome power

In Pikachu's rosy cheeks!

There'll be world domination,

Complete obliteration

Of all who now defy me.

Let the universe prepare,

Good Pokémon beware,

You fools shall not deny me!

Now go, go, go, go!

It will all be mine,

Power so divine

I'll tell the sun to shine

On only me!

It will all be mine,

Till the end of time

When this perfect crime

Makes history

Team Rocket! This is our destiny!

To protect the world from devastation

To unite all peoples within our nation

To denounce the evils of truth and love

To extend our reach to the stars above

Jessie!

James!

There'll be total devastation,

Pure annihilation

Or absolute surrender.

I'll have limitless power,

This is our finest hour

Now go, go, go, go!

how do i create a a BASIC program to triple the salary of frontline workers?​

Answers

Answer:

In Latin America and the European Union, for example, 12 and 37 percent of health workers are public sector employees, respectively. Hence wage increases may reduce funding available for other critical medical supplies and equipment, particularly in developing countries with limited fiscal resources. Wage increases for one category of workers, however well justified, can also trigger demands from other workers, particularly in countries with strong trade unions. Temporary salary increases or supplementary payments also tend to become permanent, thereby creating long-term distortions and problems of fiscal sustainability. The first step, then, is to quickly assess the level and structure of health worker compensation to quantify the amount of additional wages that should be paid. Health facility staff consists of frontline medical staff (doctors, nurses, community health workers) as well as non-medical administrative and support staff. In many World Bank client countries, the total gross wages of health workers will consist of:

1.Basic salary. This is based on pay grades in civil service pay laws, or wage legislation for public health workers.

2.Overtime allowance or compensation for overtime work. This is usually in the form of a percentage of basic pay for additional hours worked beyond what is normally specified.

3.Hazard allowance or harmful work conditions allowance. These will be allowances as a percentage of pay for working conditions that are considered risky to the individual.

Other allowances.

4.Other allowances. These typically factor in seniority, additional training, or educational qualifications, as well as working in rural areas or remote locations

5.Performance pay. These are additional payments conditional on either inputs (e.g., working hours), outputs (e.g., patients treated), or outcomes (e.g., patient satisfaction).

6.Per diems or salary supplements. These are usually for attending workshops or training and can be a significant (more than 10 percent) proportion of gross wages.

Cross-national data on health worker wages is very limited. The data that the World Bank has for 10 countries in Latin America and 27 in the European Union shows that while health care workers do enjoy a premium over workers in other sectors of the economy, the premium decreases with country income levels. For countries in the upper income category, they experience a penalty compared to similar workers in lower-income countries (controlling for sex, education, and location). These averages, however, hide variations across different categories of health workers (medical workers represent between 20 and 50 percent of all health care sector workers for countries in Latin America and the European Union).

System software includes all of the following except

Answers

Answer:

System software includes all of the following except Browsers.

Explanation:

I just know

System software includes all the following except Browsers. There are the based on the system software are the important parts.

What is software?

Software is the term for the intangible. The software is the most significant aspect. Software is a collection of rules, data, or algorithms used to run machines and perform certain tasks. Apps, scripts, and programs that run on a mobile device are referred to as software.

According to the system software, are the based on the operating system, management system, are the networking, translators, software utilities, are the networking. They are the browsers are not the used of the software, the significant components are the configuration.

As a result, the system software includes all the following except Browsers.

Learn more about on software, here:

https://brainly.com/question/985406

#SPJ2

Temperature converter. This program should prompt the user for two arguments, first a decimal number and second, a single letter, either C or F. The decimal represents a temperature, the character represents which system that degree is in (50.0 F would be 50.0 degrees Fahrenheit etc.). This program should take the given number and convert it to a temperature in the other system. The output string format should be degree(s) is equal to degree(s) . Eg. input 0 C would give the string 0.0000 degree(s) C is equal to 32.0000 degree(s) F. You can assume that either F or C will be given for input, no need to account for invalid input.

Answers

Answer:

[tex] \boxed{ \tt{I \: wrote \: the \: program \:with \:( c++)}}[/tex]

Oceans cover what percentage of the Earth's surface?
97%
O 71%
87%
99%​

Answers

Answer:

71%

Explanation:

I thik so because the percentage of oceans on earth is more

Answer:

71%

Explanation:

If it's about covering of earth's surface by water then it is 71%

But when it's about oceans covering percentage of water on earth is 97%.

what is keyboard? answer me

Answers

Answer:

something you put your fingers on

Explanation:

something you type on

instances of how computer viruses are spread​

Answers

Answer:

downloading apps from unsafe websites

Explanation:

some viruses have been embeded into this sites and when u download a file or an app the virus downloades with it

Answer:

Computer viruses can spread through the following media :

By opening an infected e-mail attachment,By downloading an infected program from the internet,By using infected floppy disk,pen drives and CDs,By transferring an infected program over a network and executing it.

10. Differentiate between equity share & preference share.​

Answers

Answer:

Equity Shares are commonly called Common shares and have both advantages and disadvantages over Preference shares.

Equity shareholders are allowed to vote on company issues while preference shareholders can not.Preference shareholders get paid first between the two in the case that the company liquidates from bankruptcy. Preference shareholders get a fixed dividend that has to be paid before equity share dividends are paid. Preference shareholders can convert their shares to Equity shares but equity shareholders do not have the same courtesy.Preference shares can only be sold back to the company while equity shares can be sold to anybody.

if 100 KB file is stored in 2 MB folder how many files can be stored in the folder​

Answers

Answer:

20 files.

Explanation:

Given the following data;

Size of file = 100 kilobytes.

Folder size (memory) = 2 megabytes.

Method 1

1000 kilobytes = 1 megabytes.

100 kilobytes  = x megabytes

Cross-multiplying, we have;

1000x = 100

x = 100/1000

x = 0.1 mb

Now, to find the number of files that can be stored;

[tex] Number \; of \; files = \frac {Memory}{Size \; of \; each \; file} [/tex]

Substituting into the equation, we have;

[tex] Number \; of \; files = \frac {2}{0.1} [/tex]

Number of files = 20 files.

Method II

We know that;

1 kilobytes = 0.001 megabytes. 100 kilobytes = 0.1 megabytes. 1000 kilobytes = 1 megabytes. 2000 kilobytes = 2 megabytes.

Substituting into the formula, we have;

[tex] Number \; of \; files = \frac {Memory}{Size \; of \; each \; file} [/tex]

Substituting into the equation, we have;

[tex] Number \; of \; files = \frac {2000}{100} [/tex]

Number of files = 20 files.

what are some applications of computer in public administration?​

Answers

Answer:

Explanation:

Embedded Systems.

Windows applications (also called 'Desktop applications')

Web Applications.

Web Services.

Console applications.

The type of memory that stores data
Currently in used is called​

Answers

Answer:

RAM (Random Access Memory)

hope it is helpful...

RAM (Random Access Memory) is the hardware in a computing device where the operating system (OS), application programs and data in current use

Here is the API for a robot library. // moves the robot forward function moveForward(); // turns the robot to the left function rotateLeft(); // turns the robot to the right function rotateRight(); // checks if a robot can move in any direction // direction {string} - the direction to be checked // return {Boolean} - true if the robot can move in that direction, otherwise returns false function canMove(direction); Which code segment will guarantee that the robot makes it to the gray square without hitting a wall or a barrier (black square)

Answers

Answer:

Option (A)

Explanation:

See attachment for options

From the options, the code segment of option (A) answers the question and the explanation is as follows:

I added a second attachment which illustrates the movement

function (solveMaze) {

moveForward(); ---- The robot moves up (to position 1)

moveForward(); ---- The robot moves up (to position 2)

rotateRight(); ---- The robot changes where it faces (however, it is still at position 2)

while(canMove("forward")) { moveForward(); } ---- This is repeated until the robot reaches the end of the grid (i.e. position 3 and 4)

rotateLeft(); ---- The robot changes where it faces (however, it is still at position 4)

moveForward(); ---- The robot moves up to the gray square

List 5 ways by which Artificial intelligence (AI) can be used to drive our business.​

Answers

Answer:

start a website

Explanation:

true

8.11 LAB: Count characters - functions 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. Ex: If the input is: n Monday, the output is: 1 Ex: If the input is: z Today is Monday, the output is: 0 Ex: If the input is: n It's a sunny day, the output is: 2 Case matters. n is different than N. Ex: If the input is: n Nobody, the output is: 0 Your program must define and call the following function that returns the number of times the input character appears in the input string. int CountCharacters(char userChar, const string

Answers

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);

What were Roman Capitals first used for?

Answers

Answer:

Square capitals were used to write inscriptions, and less often to supplement everyday handwriting. When written in documents this style is known as Latin book hand. For everyday writing the Romans used a current cursive hand known as Latin cursive. Notable examples of square capitals used for inscriptions are found on the Roman Pantheon, Trajan's Column, and the Arch of Titus, all in Rome. Square capitals are characterized by sharp, straight lines, supple curves, thick and thin strokes, angled stressing and incised serifs. These Roman capitals are also called majuscules, as a counterpart to minuscule letters such as Merovingian and Carolingian.

used to write inscriptions

Write a program named CheckCredit that prompts users to enter a purchase price for an item.

If the value entered is greater than a credit limit of $8,000, display You have exceeded the credit limit; otherwise, display Approved.

Answers

THIS IS FOR PYTHON

price = float(input('Price: '))

if price > 8000:

   print('You have exceeded the credit limit')

else:

   print('Approved')

The credit limit on your credit card is the most you are permitted to spend.

What is Credit limit?

Your credit limit won't be disclosed to you until the card you requested for is authorized. Applying for a secured credit card, where your security deposit frequently matches your credit limit, is an exception to this rule.

Also keep in mind that your credit limit is a real, set amount that you must adhere to.

You might be given the option to opt in and go beyond your limit, but only if you pay a cost. I strongly advise against signing up since it will be like having overdraft protection on your credit card. It leads inevitably to significant debt.

Therefore, The credit limit on your credit card is the most you are permitted to spend.

To learn more about Credit limit, refer to the link:

https://brainly.com/question/31053768

#SPJ3

Write a program that reads a file called 'test.txt' and prints out the contents on the screen after removing all spaces and newlines. Punctuations will be preserved. For example, if 'test.txt' contains: This is a test file, for chapter 06. This a new line in the file! Then, your program's output will show: Thisisatestfile,forchapter06.Thisanewlineinthefile! Hint: Consider using the 'strip()' and 'replace()' functions.

Answers

Answer:

I don't know  you should figure that out good luck

Explanation:

good luck

unemployment is one of the disadvantage of computer explain this statement with example​

Answers

In industry, computer technology is used by developing robots to assemble products in a short amount of time. This has led to unemployment as manual labour is kept to a minimum due to the robots being able to assemble products at a much faster speed than humans.

Passive devices _____ require any action from the occupants. A. Do not B.Sometimes C.Rarely D.Occasionally

Answers

Answer:

D:

Explanation:

I think, but double check!

Have a nice life and I hope you get full marks on your test/paper/work!

:)

For our homework we have to listen__ a podcast​

Answers

Answer:

For our homework we have to listen to a podcast

Given the mass of an airplane, the amount of forward force produced by its propellers, and the mass of the TWO gliders it is towing (airplane connected to first glider and the first glider is connected to the second glider), calculate the resulting tension on each cable connecting the aircraft and the acceleration of the glider. Vertical forces and air resistance are not considered. . Your program must accept input and produce output that matches exactly to the given executions. Note that the width modifier used for the tension values is calculated as the number of digits in the force input plus six. Example Execution #1 (eleven spaces after colon character for tension output): Enter mass of airplane (kg) -> 15000 Enter mass of glider #1 (kg) -> 5000 Enter mass of glider #2 (kg) -> 4500 Enter force produced by propellers (N) -> 75000 Acceleration: 3.06 m/s^2 -=-=-= Resulting tension on cable #1: Resulting tension on cable #2: 29081.63 Newtons 13775.51 Newtons

Answers

Answer:

Follows are the code to this question:

#include <stdio.h>//header file

int main() //main method  

{

int plane, g1, g2, f;//defining integer variables

float m,a,t1,t2; //defining float variables

printf("Enter mass of airplane (kg)-> ");//print message for input value

scanf("%d", &plane);//input value

printf("Enter mass of glider #1 (kg)-> ");//print message for input value

scanf("%d", &g1);//input value

printf("Enter mass of glider #2 (kg)-> ");//print message for input value

scanf("%d", &g2);//input value

printf("Enter force produced by propellers (N) -> ");//print message for input value

scanf("%d", &f);//input value

m= plane + g1 + g2;//use float variable m to calculate Mass

a=f/m;//use float variable a to calculate Acceleration

printf("\nAcceleration: %.2f m/s^2", a);

printf("\n-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-");//use print method for design

t1 = (g1 + g2) * a;//using the t1 variable to calculate tensions

printf("\nResulting tension on cable #1: %.2f Newtons", t1);//print tension value

t2 = g2 * a;//using the t1 variable to calculate tensions

printf("\nResulting tension on cable #2: %.2f Newtons", t2);//print tension value

printf("\n-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-");//use print method for design

return 0;

}

Output:

Please find the attached file.

Explanation:

In this code four integer variable "plane, g1, g2, and f" and four floating-point variables "m, a, t1, and t2" is declared, in which the integer variable is used for input the value from the user-end.

In the next step, the "m" variable is used, which adds the "plane, g1, and g2" integer value to calculate mass, and in the "a" variable it calculates the acceleration, and in the "t1 and t2" variable it calculates the tension and prints its value.

A hard drive cannot be partitioned until the device
is set.

Answers

Yeah that true I asked my grandpa

I need a three-digit multiplication that gives me 225 I mean: _x_x_ = 225 thanks​

Answers

Answer:

3 times 5 times 15.

Explanation:

We know 225=15 times 15. (Since it is a square.) And 15 can be split up into 3 and 5. So we can write 225 as 3 times 5 times 15.

Write a program that reads an integer, a list of words, and a character. The integer signifies how many words are in the list. The output of the program is every word in the list that contains the character at least once. Assume at least one word in the list will contain the given character.
Ex: If the input is:
4 hello zoo sleep drizzle z
then the output is:
zoo
drizzle
To achieve the above, first read the list into a vector. Keep in mind that the character 'a' is not equal to the character 'A'.
5.23.1: LAB: Contains the character
#include
#include
using namespace std;
int main() {
/* Type your code here. */
return 0;
}

Answers

Answer:

In C++:

#include<iostream>

#include<vector>

using namespace std;

int main() {

int len;

cout<<"Length: ";  cin>>len;

string inpt;

vector<string> vect;

for(int i =0;i<len;i++){

   cin>>inpt;

   vect.push_back(inpt); }

char ch;

cout<<"Input char: ";  cin>>ch;  

for(int i =0;i<len;i++){

   size_t found = vect.at(i).find(ch);  

       if (found != string::npos){

           cout<<vect.at(i)<<" ";

           i++;

       }

}  

return 0;

}

Explanation:

This declares the length of vector as integer

int len;

This prompts the user for length

cout<<"Length: ";  cin>>len;

This declares input as string

string inpt;

This declares string vector

vector<string> vect;

The following iteration gets input into the vector

for(int i =0;i<len;i++){

   cin>>inpt;

   vect.push_back(inpt); }

This declares ch as character

char ch;

This prompts the user for character

cout<<"Input char: ";  cin>>ch;  

The following iterates through the vector

for(int i =0;i<len;i++){

This checks if vector element contains the character

   size_t found = vect.at(i).find(ch);  

If found:

       if (found != string::npos){

Print out the vector element

           cout<<vect.at(i)<<" ";

And move to the next vector element

           i++;

       }

}  

Following are the solution to the given question:

Program Explanation:

Defining header file.Defining the main method.In the main method, defining a vector array of string "x", integer variable "n1,i,j", and one character and one string variable "w,c".In the method, a for loop is declared that inputs string value in "w" from user-end and using "push_back" method that add value in vector array.After input value in character an other loop is declared that holding boolean value, and defining another loop.Inside this, an if block that check array value with character value, and after check value boolean variable is declared that hold value.At the last another if block is declared that check boolean value and prints array value.

Program:

#include <iostream>//header file

#include <string>//header file

#include <vector>//header file

using namespace std;

int main() //main  method

{

   vector<string> x;//defining vector array of string

   int n1,i,j;//defining integer variable

   string w;//defining string variable

   char c;//defining character array

   cin >> n1;//input integer value

   for (i = 0; i < n1; ++i)//defining loop that inputs string value from user-end

   {

       cin >> w;//input value

       x.push_back(w);//using push_back method that add value in vector array

   }

   cin >> c;//input character value

   for (i = 0; i < n1; ++i)//defining loop that match value

   {

       bool f = false;//holding boolean value

       for (j = 0; j < x[i].size(); ++j) //defining loop that check array value with character value

       {

           if (x[i][j] == c)//defining if block that check array value with character value

               f= true;//holding boolean value

       }

       if (f)//defining if block that check boolean value

       {

           cout <<x[i] << endl;//print value

       }

   }

   return 0;

}

Output:

Please find the attached file.

Learn more:

brainly.com/question/13543413

Help a brother out


Write a java program with these specifications.





playRps – This method plays 24 rounds of rps and returns the total points earned. For each of the 24 rounds, player1’s hand
gesture will be based on calling the nextInt method of the given Random object. If the next integer is even, player1 will play
rock. If it is odd, player1 will play paper. Player1 never plays scissors. Player2 will play rock in the first round, paper in the
second round, scissors in the third round, and repeat the cycle starting with rock again in the fourth round. The method will sum
the return values for the 24 calls to rps and return the total. Note, since an invalid input is never passed in to an rps call using
playRps, your return value should always be a non-negative number.

Answers

Answer:

import java.util.*;  

class Main {

 private enum RPS { Rock, Paper, Scissors };

 private static RPS[] options = { RPS.Rock, RPS.Paper, RPS.Scissors };

 private static String[] names = {"Rock", "Paper", "Scissors"};

 // Return 1 if player 1 beats player 2, 0 otherwise

 static public int rps( RPS p1, RPS p2 ) {

   if (p1 == RPS.Rock && p2 == RPS.Scissors) return 1;

   if (p1 == RPS.Scissors && p2 == RPS.Paper) return 1;

   if (p1 == RPS.Paper && p2 == RPS.Rock) return 1;

   return 0;

 }

 static public int playRps() {

   Random rnd = new Random();      

   int totalPoints = 0;

   

   for(int round = 0; round < 24; round++) {

     int randomNumber = rnd.nextInt(2);  

     RPS player1 = options[randomNumber];      

     RPS player2 = options[round%3];

     String name1 = names[randomNumber];

     String name2 = names[round%3];

     int score = rps(player1, player2);

     if (player1 == player2) {

       System.out.printf("%d. Both players %s. Draw.\n",  round+1, name1);

     } else if (score == 0) {

       System.out.printf("%d. %s does not beat %s, player 1 loses.\n",  round+1, name1, name2);

     } else {

       System.out.printf("%d. %s beats %s, player 1 wins.\n", round+1, name1, name2);

     }      

     totalPoints += score;

   }

   return totalPoints;

 }

 public static void main(String[] args) {

   System.out.println("Playing RPS.");

   int total = playRps();

   System.out.printf("Player 1 earned %d points.\n", total);

 }

}

areas on which the development of the computer as a communication technology is based

Answers

Answer:

Artificial Intelligence.

Automated personal digital assistant.

THz frequencies for Communications (5G & 6G)

Blockchain.

Virtual reality and augmented reality.

Internet of Things (IoT)

Visible light communication.

LTE.

Explanation:

Write a recursive method called method3 that accepts an integer parameter and returns the integer reformed by repeating digits 1 and 2. For example, method3 (123456) will return 11223456 repeating only 1 and 2 and method3 (21) will return 2211. If the number is 0, return 0. You may assume that n is not negative

Answers

Answer:

Explanation:

The following is written in Java and creates only the method3 and returns a new method after doubling all of the 2's and 1's in the input.

public static int method3(int x) {

       int finalValue = 0;

       String number = String.valueOf(x);

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

           if (number.charAt(i) == 1 || number.charAt(i) == 2) {

               finalValue += Integer.valueOf(number.charAt(i));

               finalValue += Integer.valueOf(number.charAt(i));

           } else {

               finalValue += Integer.valueOf(number.charAt(i));

           }

       }

       return finalValue;

   }

Other Questions
Please Help Mee!!! Write equations for the lines shown.Describe how to find the solution to the corresponding system by looking at the graph.Describe how to find the solution to the corresponding system by using the equations. write a letter to your friend un another school telling him how you celebrate your kudum festival How did geography contribute to the economic development of Harappa?Harappa used the fertile land to hunt animals for trade with other cities.Harappa used the Indus River to trade and become a major fishing city.Harappa used floodwater in trade and stored it for later use.Harappa used fertile land from the Indus River to farm and trade. The people of one country have decided they no longer wish to have individual state governments. They all basically have the same laws anyway, so to save on taxes they wish to grow the size of the central government and dissolve the state governments.Which system of government do the people of this country want? Unitary Federation Parliamentary Confederation Find the gradient of the line segment between the points (-1,1) and (-1,4). which action kept the United States fromjoiningtheLeagueof Nations?A) massive public protests B) veto by the president C) opposition in the senate D) revision of Treaties What canal was built to enhance shipping routes in North Africa and Southwest Asia? how does spatial diffusion of diffusion of islam compare to that of christianity? helppp meeeeee plssssss asap Help me please I would be very thankful. I need help with this whoever can get it right I will mark you brainlest Please select the word from the list that best fits the definitionTois to exchange goods without the use of money. Can somebody plz help solve these 2 word problems (only if u know how to do them) and show the equation! Thx :3WILL MARK BRAINLIEST WHOEVER CAN ANSWER FIRST :DDD Can someone plz help me with question? I would really appreciate if you do. una lata de refresco de 600 ml contiene 60 grs de azcar Cunta azcar tiene en 4/5 de contenido de la lata Change 0.384 to a percent.384%3.84%38.4%38.4 F14 cm8 cmxFind the size of angle x.Give your answer correct to 1 decimal place. What is the missing length?P21 ftarea =378 ft? PLEASE HELP SOMEONE I DONT KNOW HOW THIS WORKS The product of -13 and K