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
castortr0y [4]
3 years ago
6

Assume that nextWord is a String variable that has been given a String value consisting entirely of letters. Write some Java cod

e that outputs the message "First half of the alphabet" , provided nextWord precedes "N" in alphabetic ordering. IfnextWord does not precede "N" in alphabetic ordering, the code should output"Second half of the alphabet" . (Note that "N"uses double quotes to produce aString value, as opposed to using single quotes to produce achar value.) '
Computers and Technology
1 answer:
wel3 years ago
8 0

Answer:

The code example is given below with explanation in c++ language.

Explanation:

Comments will explain what's going on in the code. Below code is already compiled and tested.

#include <time.h>

#include <iostream>

#include <sstream>

using namespace std;

int main(void)

{

//defining start and end time variable

// which will be used to break the infinte loop

   time_t endwait;

   time_t start = time(NULL);

   time_t seconds = 3; // end loop after this time has elapsed

cout<<"Input your number :";

long userNum;

cin>> userNum;

// initializing end time by adding seconds with start time

   endwait = start + seconds;

   // defining outputString which will concatenate all the  

   // divisible numbers in loop

string outputString="";

// bool isCompleted will use to check whether our  

// loop breaks successfully or time is expired.

bool isCompleted=true;

// iterate loop until it comes to 1. as in loop

// the program already displayed the 1 value.

   while (userNum>1)

   {  

  // checking start and end time comparison to  

  // break the infinite loop after some seconds

    if(start >= endwait){

     cout<< "Program end never reached.";

     isCompleted=false;

     break;

 }

 

    userNum=userNum/2;

   // defining stringstream to convert from long to string

    stringstream longToString;

    longToString<<userNum;

  // concatenating all the values

    outputString = outputString + longToString.str()+" ";

   // re initializing the start time with current time.

       start = time(NULL);

   }

   

  // check if while loop breaks successfully then print the

   // series of numbers here.

   if(isCompleted) {

    cout << outputString;

}

   return 0;

}

You might be interested in
Synthesize (15 points)
Veronika [31]

Answer:

Perfection: When you make a mistake, no one cares but you.

Even the most accomplished public speaker will make a mistake at some point. Just keep in mind that you’ll notice more than anyone in your audience. The most important thing you can do after making a mistake during a presentation is to keep going. Don’t stop and—unless the mistake was truly earth shattering—never apologize to the audience for a minor slip. Unless they are reading the speech during your delivery, the audience won’t know if you left out a word, said the wrong name, or skipped a page. Because “to err is human,” a mistake can work for you, because it allows you to connect with your audience. People don’t want to hear from someone who is “perfect;” they will relate much more easily to someone who is real.

Master the art of public speaking and crush your next presentation with one of our public speaking seminars, available online and in a classic classroom format.

Effective Executive Speaking

Take your public speaking to the next level! Speak, present and communicate with poise, power and persuasion.

Visualization: If you can see it, you can speak it.

Winners in all aspects of life have this in common: they practice visualization to achieve their goals. Sales people envision themselves closing the deal; executives picture themselves developing new ventures; athletes close their eyes and imagine themselves making that basket, hitting that home run, or breaking that record.

The same is true in public speaking. If you’ve read “10 Powerful Body Language Tips” then you know how anxiety can impact presentation skills. The best way to fight anxiety and to become a more comfortable speaker is to practice in the one place where no one else can see you—your mind. If you visualize on a consistent basis, you’ll prepare your mind for the prospect of speaking in public, and pretty soon you’ll conquer any feelings of anxiety.

Discipline: Practice makes perfectly good.

Your goal is not to be a perfect public speaker. There is no such thing. Your goal is to be an effective public speaker. Like anything else in life, it takes practice to improve those public speaking skills. We too often take communication for granted because we speak to people everyday. But when your prosperity is directly linked to how well you perform in front a group, you need to give the task the same attention as if you were a professional athlete. Remember, even world champion athletes practice every day. Try taking a class where you practice giving speeches.

8 0
3 years ago
The area of a square is stored in a double variable named area. write an expression whose value is length of the diagonal of the
ale4655 [162]
You should specify what language you're using in these types of questions; here's an example in C++.

#include <iostream>
#include <math>

int main()
{
// example area
double area = 25;

// square root the area to find the length
// then apply basic pythagoras
double diagonal = sqrt(pow(sqrt(area), 2) + pow(sqrt(area), 2));

return 0;
}
8 0
3 years ago
someone please please help with this we have to make a sketch of a hydraulic spreader or cutter I chose the spreader now we have
AnnyKZ [126]

Answer:

heueururjrurh the best time to meet Vs t and get the use and may contain briy the best you had any y I have the same time ❤️ ry HR y regards Umesh he was a pleasure to have a great trip and u it

Explanation:

dgsisbsjdudb and I have a nice day best wishes for a few weeks back and I will send you an email from your NVR

8 0
3 years ago
Public class Bird
Anna007 [38]

Answer:

Answer below.

Explanation:

You are creating an object of bird "b" with a talon strength of 5 and a beak of 5.

public Hawk(int talon, int beak)

{

super(beak);

talonStrength = talon;

}

Please mark brainliest if this is the answer you were looking for

Please mark brainliest if this is the answer you were looking for

6 0
3 years ago
In which of the following scenarios would you use the Redo function?
MakcuM [25]
D. <span>You have just used the Undo function to delete a paragraph, and you want that paragraph back.</span>
6 0
3 years ago
Other questions:
  • True or false A ClassB fire involves live electrical equipment
    5·1 answer
  • Your employer gives you a list of all chemicals in the entire building and the location of the SDS collection, and he asks you t
    15·2 answers
  • Please Do Solve it guys...
    6·1 answer
  • The reliance on _____ as the design methodology for relational databases is seen as a stumbling block to its use in OLAP systems
    5·1 answer
  • William wants to create a document using a DTP<br> what time saving techniques can he use?
    9·1 answer
  • . What type of computer implementation does the following code represent? Load A,10 Load B,1:5 Add A,B STORE A, [20]
    5·1 answer
  • Which data type is also called a binary object?
    9·2 answers
  • Tara is creating a presentation for her science project about volcanoes. She added different animations to every slide for empha
    12·1 answer
  • What do you do when you have computer problems? Check all that apply. PLEASE HELP
    9·2 answers
  • Which game would you play info you were competitive?
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!