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
Evgen [1.6K]
3 years ago
10

Alguien me podria ayudar a hacer este codigo porfavor? en php Desarrolle el código que solicite los datos (desde teclado) Nombre

, Edad y peso. Posteriormente realice lo siguiente: a) Imprima los datos. b) Solicite el peso hasta que el rango de valores sea entre 50 y 100 kilos. c) La edad debe ser entre 18 y 50 años Suba los archivos con el código y la evidencia de la ejecución.
Computers and Technology
1 answer:
Kruka [31]3 years ago
8 0

Answer:

Explanation:

El codigo solicita los datos y los analiza. Si estan bien continua, sino los vuelve a solicitar. Cuando esten todos los datos bien los imprime.

import java.util.Scanner;

class Brainly {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Nombre: ");

       String nombre = in.nextLine();

       int Edad, peso;

       while (true) {

           System.out.println("Edad: ");

           Edad = in.nextInt();

           if ((Edad >= 18) && (Edad <= 50)) {

               break;

           }

       }

       while (true) {

           System.out.println("Peso: ");

           peso = in.nextInt();

           if ((peso >= 50) && (peso <= 100)) {

               break;

           }

       }

       System.out.println("Nombre: " + nombre);

       System.out.println("Edad: " + Edad);

       System.out.println("Peso: " + peso);

   }

}

You might be interested in
While writing a report, Jack decided to rearrange several areas of text to improve the flow. To move a set of characters, he wou
gladu [14]
C is a best answer
I hope it’s work
3 0
3 years ago
Technicans A says the engine camshaft converts reciprocating motion of the piston into rotary montion for power output. Technici
garri49 [273]

It doesn't say what Technician B thinks, but I can tell you what the camshaft does and then you can decide who is right on your own. The camshaft is little metal rounded triangles above the piston that times when the intake and exhaust valve open and close.

Technician A is very wrong, the camshaft doesn't do that.

6 0
4 years ago
LAB: Count characters - methods
tangare [24]

Answer:

i hope understand you

mark me brainlist

Explanation:

using namespace std;

#include <iostream>

 

#include <string.h>

#include <stdlib.h>

#include <stdio.h>

 

#define BLANK_CHAR (' ')

 

 

int CountCharacters(char userChar, char * userString)

{

 

int countReturn=0;

 

int n = strlen(userString);

 

for (int iLoop=0; iLoop<n; iLoop++)

{

       if (userString[iLoop]==userChar)

       {

        countReturn++;

 }

}

return(countReturn);

}

 

/******************************************

    Removes white spaces from passed string; returns pointer

     to the string that is stripped of the whitespace chars;

   

  Returns NULL pointer is empty string is passed;  

     Side Effects:

 CALLER MUST FREE THE OUTPUT BUFFER that is returned

 

 **********************************************************/

char * RemoveSpaces(char * userString)

{

 

 char * outbuff = NULL;

 

 if (userString!=NULL)

 {

   int n = strlen(userString);

    outbuff = (char *) malloc(n);

 

   if (outbuff != NULL)

   {

          memset(outbuff,0,n);

          int iIndex=0;

          //copies non-blank chars to outbuff

         for (int iLoop=0; iLoop<n; iLoop++)

         {

           if (userString[iLoop]!=BLANK_CHAR)

          {

           outbuff[iIndex]=userString[iLoop];

           iIndex++;

   }

   

   } //for

         

   }

   

   }

 return(outbuff);

 

}

 

 

int main()

{

 

 char inbuff[255];

 cout << " PLEASE INPUT THE STRING OF WHICH YOU WOULD LIKE TO STRIP WHITESPACE CHARS :>";

 gets(inbuff);

 

 char * outbuff = RemoveSpaces(inbuff);

 if (outbuff !=NULL)

 {

    cout << ">" << outbuff << "<" << endl;

    free(outbuff);

    }

     

   memset(inbuff,0,255);  

   cout << " PLEASE INPUT THE STRING IN WHICH YOU WOULD LIKE TO SEARCH CHAR :>";

gets(inbuff);

 

  char chChar;

 cout << "PLEASE INPUT THE CHARCTER YOU SEEK :>";

 cin >> chChar;

 

 int iCount = CountCharacters(chChar,inbuff);

 cout << " char " << chChar << " appears " << iCount << " time(s) in >" << inbuff << "<" << endl;

 

}

4 0
3 years ago
) The _____ method of a radio button returns true if that button is on.
Lostsunrise [7]

Answer:

isSelected()

Explanation:

The isSelected() method of a radio button returns true if that button is on and false otherwise. This method is defined in the class javax.swing.AbstractButton. JRadioButton class inherits from AbstractButton and thus has access to this method. An application code can invoke this method on the radio button instance to determine th ecurrent state and alter the control flow accordingly.

4 0
3 years ago
*
asambeis [7]

Answer:

I think they're all valid but the validility depends on the website your using the usernames on.

Explanation:

6 0
3 years ago
Other questions:
  • An Information Technology worker who follows the Programming and Software development pathway most likely enjoys
    15·2 answers
  • An application that can be launched from my web browser is known as a _____. java applet spreadsheet cad software music applicat
    14·1 answer
  • Question 12 (1 point)
    6·1 answer
  • What is added to the &lt; meta &gt;tag to describe the encoding type?
    15·1 answer
  • What is the use of comma and semicolon with print statement ?​
    11·1 answer
  • Sandi wants to check the average grades in her classroom. Which loop or algorithm should she use?
    8·1 answer
  • How many passes will it take to find the five in this list?
    6·2 answers
  • Mention the usage of crop concept in ms-word​
    13·2 answers
  • How do you delete questions you asked?
    7·2 answers
  • Which of the following makes Super Mario Run unique?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!