Programming challenge description: In this challenge, you're given a string containing jumbled letters from several concatenated words. Each word is a numeral from zero to nine. Each numeral may be used multiple times in the jumbled string. Write a program that returns integers corresponding to the numerals used to form the jumbled string. Integers must be sorted in ascending order. For example, reuonnoinfe are shuffled letters of the strings one four nine. Your program's output should be 149. Input: A string formed from jumbled letters of numerals. For example:

Answers

Answer 1

Following are the Java program to the given question:

import java.util.*;//import package

public class Jumbledletters //defining Jumbledletters class  

{

public static void main (String[] axv)//defining main method

{

String num[] = {"zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"};//defining an arrayof string

int i,j;

Scanner xc = new Scanner(System.in);//creating Scanner class object to input value

System.out.print("Enter value: ");//print message

String v= xc.next();//defining a String variable that input String value

for(i=0; i<num.length; i++)//defining a loop to count input String length

{

String s = num[i];//defining a string variable to hold array value

boolean f = true;//defining a boolean variable

for(j=0; j<s.length(); j++)//defining a for loop that convets value into integer

{

char c = s.charAt(j);//defining char variable that hold value

if(v.indexOf(c)==-1)//defining if block to check indexOf value

{

f = false;//use boolean variable that hold boolean value

break;//using break keyword

}

}

if(f) //use if to check boolean value

System.out.print (i);//use print method that print i value

}

System.out.println();//use print method for beak line

}

}

Output:  

Enter value: onefournine

149

Explanation of code:

Import package.Defining the Jumbledletters class and also define the main method in it.Inside the main method defining a string of array "num" that holds string value and two integer variables "i,j" is defined.In the next step, a scanner class object is declared that inputs the value.After input, a value a for loop is defined that uses a string variable that holds an array value and uses another loop that converts string value into a numeric value.

Learn more:

brainly.com/question/24379089


Related Questions

Suppose you are asked to design a rotating disk where the number of bits per track is constant. You know that the number of bits per track is determined by the circumference of the innermost track, which you can assume is also the circumference of the hole. This, if you make the hole in the center of the disk larger, the number of bits per track increases, but the total number of tracks decreases. If you let r denote the radius of the platter, and x · r the radius of the hole, what value of x maximizes the capacity of the disk?

Answers

Answer:

suppose i was i would tell them i dont know and walk away

Explanation:

in thoery this is correct

you said suppose so i answerd

there is no use in reporting or getting this taken down

nether is it right

im not stealing points

Because in thoery its an answer

THIS IS MY PROTEST

When it comes to memory, why is it important to have enough storage space on a hard drive when using many RAM intensive programs?

Answers

Answer:

Memory and storage are important concepts to master in Information Technology. ... This type of memory is volatile which means that the actual data disappears when the computer loses power. Because memory needs to be much faster than storage, it is rather more expensive than storage per GB.

Explanation:

2. Which of these Is NOT part of the definition of Electricity?

A. Ability to do work

B. Closed Circuit

C. Power Supply

D. Movement of electrons

Answers

Answer:

B. closed circuit

Explanation:

please follow me

hope it helps you

List the resulting array after each call of the merge method. Indicate the number of character-to-character comparisons made for each call to merge (line 22 of the merge method at the end of the assignment). Sort the following array of characters into alphabetical order: C Q S A X B T.
01 public static void mergesort (char[] a, int i, int r){
02
03 if (1 >= r) {
04 return;
05 }
06 int middle = (1+r)/2;
07 mergesort(a, l, middle);
08 mergesort(a, middle+1, r);
09 merge(a, l, middle, r);
10 }
11
12 public static void merge (char[] a, int i, int m, int r){
13
14 //copy lower half of the array into b
15 char [] b = new char[m-1+1];
16 for (int i = 0; i <= m-1; i++ ) {
17 b[i] = a (1+i);
18 }
19
20 int i = 0, j m+1, k = 1;
21 while (i <= m-1 && j <= r ) {
22 if (a[j] < b[i]) {
23 a[j];
24 k += 1;
25 j += 1;
26 } else {
27 a[k] b[i];
28 k += 1;
29 i += 1;
30 }
31 }
32 while (i <= m-1) {
33 a[k] b[i];
34 k += 1;
35 i += 1;
36 }
37 while ( j <= r ) {
38 a[k] a[j];
39 k += 1;
40 j += 1;
41 }
42 }

Answers

Answer:

40j

Explanation:

the no. divided by one is that no.


8. Which of the following is
most likely to contain a
computer virus?


1.CD-ROM
2.RAM
3.Floppy Disk
4.ROM

Answers

Answer:

4. A floppy Disk

Explanation:

This is because it can be transfered from one device to another. So, if one device is infected with a virus, it'll be affected

[tex].[/tex]

True or False, In adversarial searching, agents using the MiniMax algorithm always select the state that has the highest guaranteed net value.

Answers

Answer:

True

Explanation:

The MiniMax algorithm computes the MiniMax decision from the current state. The MiniMax algorithm always is especially known for its usefulness in calculating the best move in two-player games where all the information is available

in media literacy,
how does media influence public? and the press

⚫ analyze or compare the influences of social media
⚫ analyze the ethics or journalist, news outlets, etc​

Answers

what is mean by computers

_ is an environment where processors are embedded in objects that communicate with one another via the Internet or wireless networks.

Answers

The right answer will be "The Internet of Things (IoT)".

Connecting computers systems, electromechanical machinery as well as digital ones with distinctive identifications as well as the possibility of transference of information through the internet without interactivity as well as people.Such an IoT system would be a collection of web-enabling connected devices which employ embedded subsystems, particularly CPUs, captors, and networking gear, to gather as well as transmit information from their surroundings and execute upon that.

Learn more about IoT here:

https://brainly.com/question/19995128

what are the functions of an input device​

Answers

to provide data and control signals to an information processing system such as a computer or other information appliance.

Answer:

This article does not cite any sources.

In computing, an input device is a piece of equipment used to provide data and control signals to an information processing system such as a computer or information appliance. Examples of input devices include keyboards, mouse, scanners, cameras, joysticks, and microphones.

why do many webpages use graphical design and images

Answers

Answer:

Many web pages use graphical designs and images because people are drawn more to images and graphics than just plain text.

what is web browser give answerwh
at is web browser

Answers

Answer:

A software application used to access information on the World Wide Web is called a Web Browser.

Explanation:

When a user requests some information, the web browser fetches the data from a web server and then displays the webpage on the user's screen.

Run the program and observe the output to be: 55 4 250 19. Modify the numsInsert function to insert each item in sorted order. The new program should output: 4 19 55 250.
#include
#include
using namespace std;
void numsInsert(vector& numsList, int newNum) {
unsigned int i;
for (i = 0; i < numsList.size(); ++i) {
if (newNum < numsList.at(i)) {
// FIXME: insert newNum at element i
break; // Exits the for loop
}
}
// FIXME: change so executes if higher number NOT found
// Change "true" to "i == ??" (determine what ?? should be)
if (true) { // No higher number was found, so append to end
numsList.push_back(newNum);
}
}
void numsPrint(const vector& numsList) {
unsigned int i;
for (i = 0; i < numsList.size(); ++i) {
cout << " " << numsList.at(i) << endl;
}
}

int main() {
vector numsList;
numsInsert(numsList, 55);
numsInsert(numsList, 4);
numsInsert(numsList, 250);
numsInsert(numsList, 19);
numsPrint (numsList);

return 0;
}

Answers

Answer:

#include <iostream>

#include <vector>

using namespace std;

void numsInsert(vector<int>& numsList, int newNum) {

   unsigned int i;

   for (i = 0; i < numsList.size(); ++i) {

       if (newNum < numsList.at(i)) {

           // FIXME: insert newNum at element i

           numsList.insert(numsList.begin() + i, newNum);

           break; // Exits the for loop

       }

   }

   // FIXME: change so executes if higher number NOT found

   // Change "true" to "i == ??" (determine what ?? should be)

   if (i == numsList.size()) { // No higher number was found, so append to end

       numsList.push_back(newNum);

   }

}

void numsPrint(const vector<int>& numsList) {

   unsigned int i;

   for (i = 0; i < numsList.size(); ++i) {

       cout << " " << numsList.at(i) << endl;

   }

}

int main() {

   vector<int> numsList;

   numsInsert(numsList, 55);

   numsInsert(numsList, 4);

   numsInsert(numsList, 250);

   numsInsert(numsList, 19);

   numsPrint(numsList);

   return 0;

}

Explanation:

Software engineer is responsible for defining the level of maturity the software program must perfom at in order to declare software test

a. True
b. False

Answers

Answer:

true

Explanation:

Hope, it helps to you

What software programming language was first
used to power the Internet (.com, .net)?

Answers

Answer:

the answer should be .com, because the very first domain was Symbolics.com

Explanation:

hope this helps, have a great day.

Most shop accidents are caused by?

Answers

Answer:Most shop accidents are caused by÷

liftingpoor light trips and fallsstressdangerous materialsact of shop violencedehydrationextreme tiredness

Identify the technique to free up the CPU by allowing device controllers to independently transfer data between the device and main memory.
a. Programmed I/O.
b. Direct Memory Access (DMA).
c. Polling.
d. CPU interrupt.

Answers

Answer:

B. - Direct Memory Access (DMA)

Explanation:

...

Direct Memory Access (DMA) is the technique to free up the CPU by allowing device controllers to independently transfer data between the device and main memory. Thus, option B is correct.

What is Direct Memory Access?

Direct memory access is a computer system feature that allows some hardware subsystems to access main system memory without relying on the central processor unit.

Direct memory access (DMA) is the method of transmitting data without using the CPU. It is frequently used to transport data to and from input/output devices. To manage the transfer, a second DMA controller is necessary.

DMA is a mechanism that allows an input/output (I/O) device to transmit or receive data directly to or from main memory, bypassing the CPU to speed up memory operations. A chip known as a DMA controller manages the process (DMAC).

Therefore, option B is correct.

Learn more about the Direct Memory Access, refer to:

https://brainly.com/question/7218477

#SPJ5

Comparison
Cloud computing and parallel processors

Answers

Anwser is 2/3

Explanation:

4. What is an Abacus?​

Answers

Explanation:

an abacus is a simple device for calculating, consisting of a frame with rows of wires or grooves along which beads are slid.

45. _____ is used to create an object. a. Class b. constructor c. User-defined functions d. In-built functions

Answers

Answer: B

Explanation:       A constructor is a special method of a class or structure in object-oriented programming that initializes a newly created object of that type. ... Instead of performing a task by executing code, the constructor initializes the object, and it cannot be static, final, abstract, and synchronized.

In computer programming, a resource which is used to create an object is called: B. constructor.

What is a constructor?

A constructor can be defined as a special method that is designed and developed to enable programmers create and initialize objects in Java programming.

This ultimately implies that, a constructor is a resource which can used to create an object in computer programming.

Read more on constructor here: https://brainly.com/question/26914047

Juan is a network administrator and must set up a VPN for his company's network. To allow safe communication, he should

select Control Panel, then Network Protocols, then Internet
select the radio button, then change the adapter settings protocol
select the Security tab, then PPTP, and then Allow Protocols
select Set Up a Public Connection, then Disable Protocols

Answers

Answer:

select Control Panel, then Network Protocols, then Internet

Explanation:

Seeing as Juan is a network admin, he has access to the programs of the computer. Being tasked with setting up a VPN, he must go to the control panel, then network protocols (to see the network rules, per say), then the internet tab to finally set up the VPN.

To allow safe communication, Juan must select control panel  then, network protocols, and then  internet. Therefore, option A is correct.

What is VPN ?

You can interact secretly and securely within your corporation using a virtual private network (VPN), which is an extension of a company's intranet over the preexisting structure of either a public or private network.

The i5/OS operating system is utilised by both businesses, and a VPN connection can give them the protection they require to communicate between their respective networks. Compared to using conventional non-switched lines, creating a VPN is more cost-effective.

To allow a safe communication, the network operator should allow the internet protocol to interpret and which can be activated from the control panel. Hence, option A is correct.

Find more on VPN:

https://brainly.com/question/29432190

#SPJ3

What are the things you needed to create a bootable USB Windows Installera​

Answers

Answer:

RUFUS

Explanation:

Try installing rufus software and burn the ISO file on your USB by choosing appropriate partition scheme MBR or GBT.  Usually MBR works for all computers but GPT is for new systems with latest technology.

When it comes to different ways of storing data on the device in a cross-platform manner, what is convenient about both native iOS and Android platforms?

a. they both provide secure file i/o
b. they both provide key-value, file i/o and sqlite data storage
c. the both provide the exact same system calls, since both platforms rely on ARM processors
d. they both provide the exact same APIs, regardless of language used

Answers

A - both provide secure file i/o

Egovernment involves the use of strategies and technologies to transform government by improving the delivery of services and enhancing the quality of interaction between the citizen-consumer within all branches of government.

a. True
b. False

Answers

I guess the answer True

_____________ is driving a complete reanalysis of what information is collected and how it is presented, navigated, and used internally.

Answers

“Internal Self-Service” is driving a complete reanalysis of what information is collected and how it is presented, navigated, and used internally.

Saving means

A) Copying data from memory to disk

B) Copying data from disk to
memory

C) Preserving a program

D) Storing data in a program

Answers

Answer:

To copy data from a temporary area

Write a short note on
i) Printer
i)Speaker
( no problem if u don't know but don't just spam :(.....)​

Answers

A printer is a device that accepts text and graphic output from a computer and transfers the information to paper, usually to standard-size, 8.5" by 11" sheets of paper. Printers vary in size, speed, sophistication and cost.

software.
Q4..
Microsoft word is an example of
(A) System
(1) word processor
(°) Presentation software
(P) Spreadsheet

Answers

Ms Word is an example of a word processor.

One example of a Word Processor is Microsoft Word, but other word processing applications are also widely used.

Write short note on:
i) keyboard
ii) Web camera

Answers

Um I’m not sure about that
_ Stay positive because failure is sort of success
_ dream big work hard
_no caption the ____ said it all

What method is known as a class's constructor, because it is run automatically when a user instantiates the class

Answers

      A constructor is a special method of a class or structure in object-oriented programming that initializes a newly created object of that type. ... Instead of performing a task by executing code, the constructor initializes the object, and it cannot be static, final, abstract, and synchronized.

Please answer this, don't skip please. I would really appreciate if you had knowledge over this question and helped out :)

1) The tag is the second of two main parts of a web page. The information between the opening and closing tag is seen by web page visitors in the browser window. True or False
2) The area is the first of two main parts of a web page. The header is where the operation code resides. True or False


3) The next tag is the tag - the head is the first of two main parts of a web page. The head is where the operation code resides. True or False

Answers

Answer:

1) they are only visible to the to the person/people who are running the website. therefore the answer to that statement is false.

2) they operation code of a website resides at the end of a address, therefore that statement is also false

Explanation:

Other Questions
Find two sorces of information about the same scientific investigation. then, fill out the chart below to explain why you think each sorce is trustworthy or un trustworthy suppose the two vertical angles are measuring 6x + 15 and 4x + 32. what is the measure of each angle? Use a real number to represent the situation.The temperature falls 14F. explain why knowledge of microbiology is useful in understanding life processes in higher plants and animals. s= zh - 2zt^3 solve for z 1. Next door neighbors attend the same school but take different routes to go between home and campus. Student As mom drives a distance of 12 miles and takes about 30 minutes.Student Bs dad drives a distance of 11.5 miles and takes about 29.5 minutes.Which parent is driving at a faster rate and how do you know?2. Which of the following are equivalent to 75 mi/hr?a. 1 mi/75 hrb. 25 mi/20 minc. 37.5 mi/50 mind. 150 mi/1.5 hre. 225 mi/3 hr Who can help with apprentice essay? Given the functions f(x)=3x2and g(x)=4x+1. Find (f+g)(x) and simplify completely. QuestionTranslate and solve 3084 is what percent of 24,99 Worth 10 points! I will give brainliest!! Please help!!! See picture! How was the old Ghana Empire formed Help me pls i have to finish my homework i have more questions to post too Find the length of the segment.segment EA please help me th that question Cheryl, Rita and four of their friends go to a movie and share a 48-ounce bag of popcorn equally and three 48 inch licorice laces equally write a ratio comparing the number of ounces of popcorn to the number of friends. then write a unit rate comparing the lenght of licorice lace for each person. Solve each equation V/8=13 if n=4 and m=3 find 2n-3m please help giving brainlest if work shown, explained step by step In Massachusetts only male members of the church could vote, how may this lead to problems as the colony grows? what is the chemical formula of (Sodium hydroxide ) ??