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
alexgriva [62]
3 years ago
7

Using an array, double each of the following values and print each result: values = [1.1, 10, 4.55, 30004, 0.2]

Computers and Technology
1 answer:
11111nata11111 [884]3 years ago
3 0
Values = [1.1, 10, 4.55, 30004, 0.2]
You might be interested in
Define a function UpdateTimeWindow() with parameters timeStart, timeEnd, and offsetAmount. Each parameter is of type int. The fu
Evgesh-ka [11]

Answer:

C code is given below

Explanation:

// Define a function UpdateTimeWindow() with parameters timeStart, timeEnd, and offSetAmount. Each parameter is of type int. The function adds offSetAmount to each of the first two parameters. Make the first two parameters pass-by-pointer. Sample output for the given program:

#include <stdio.h>

// Define void UpdateTimeWindow(...)

void UpdateTimeWindow(int*timeStart, int* timeEnd, int offSetAmount){

*timeStart = *timeStart+ offSetAmount;

*timeEnd = *timeEnd+ offSetAmount;

}

int main(void) {

  int timeStart = 0;

  int timeEnd = 0;

  int offsetAmount = 0;

  timeStart = 3;

  timeEnd = 7;

  offsetAmount = 2;

  printf("timeStart = %d, timeEnd = %d\n", timeStart, timeEnd);

  UpdateTimeWindow(&timeStart, &timeEnd, offsetAmount);

  printf("timeStart = %d, timeEnd = %d\n", timeStart, timeEnd);

  return 0;

}

5 0
3 years ago
Can I make all front end project with Javascript OOP(Object Oriented Programming)?
anyanavicka [17]

Answer:

yeah u can my brother go for it

6 0
2 years ago
Interpret the Department of Homeland Security’s mission, operations and responsibilities.
Shalnov [3]

Answer:

 The department of homeland security mission is to provide the efficient and good security system to the nation in all the aspects against the terrorism.

The main aim of the department of homeland security mission is to anticipate fear based oppressor assaults inside the United States, decrease the weakness of the United States to psychological oppression, and limit the harm, and aid the recuperation from psychological oppressor assaults that do happen in the United States.

The main responsibility of this department is that:

  • Providing the security against the threats of terrorism attacks
  • Providing the effective and quick recovery from the disaster
  • Also, give the secured cyber space to the homeland.
7 0
3 years ago
Which term describes a character used to separate items in a text file?
frosja888 [35]

Answer:

extension describes a character used to separate items in a text

6 0
3 years ago
Create a brief program that demonstrates use of a Java exception. For example, you could use InputMismatchException and ask the
HACTEHA [7]

Answer:

Here is the program that demonstrates the use of JAVA exception:

import java.util.Scanner;  //to accept input from user

public class Main {  //class name

   public static void main(String[] args) {  //start of main method

      Scanner input = new java.util.Scanner(System.in);  //creates Scanner class object to accept input from user

       int number1 = 0;  //stores the first integer value

       int number2 = 0;  //stores the second integer value

       while(true) {  //keeps looping until user enters integer value

           System.out.println("Enter 2 integers to perform addition: "); //prompts user to enter two integer values

           try {  //defines a chunk of code to check for errors        

               number1 = input.nextInt(); //reads input integer 1

               number2 = input.nextInt(); //reads input integer 2                  

               break;             }  

           catch (java.util.InputMismatchException e) { // defines a code chunk to execute if an error occurs in the try code chunk

              System.out.println("Input must be an integer "); //displays this message if user enters anything other than an integer value

              input.nextLine();              }         }  // reads input from user again until user enters both integer type values

       System.out.println("The sum is: " + (number1+number2));      }  } //if user enters 2 integers then computes and displays the sum of two integer values

Explanation:

The program uses InputMismatchException exception and asks the user to input two integers and computes the sum of two integers if user enters  integers otherwise an exception InputMismatchException is thrown and a error message Input must be an integer is displayed to the user if they input a string of letters instead o f integer values. Here while loop is used which keeps executing until user enters both the integer values. After the user enters correct values, the sum of the two integers are computed and result is displayed on output screen. The screenshot of program and its output is attached.

Another program asks the user to input an integer and the program executes correctly if they enter an integer but exception InputMismatchException is thrown with an error message that is is displayed to the user if they input a string of letters. Here is the program:

import java.util.Scanner;

public class Main {

   public static void main(String[] args) {

       Scanner input = new java.util.Scanner(System.in);

       int number1 = 0;          

       while(true) {

           System.out.println("Enter an integer value: ");        

           try {

               number1 = input.nextInt();  

               break;             }  

           catch (java.util.InputMismatchException e) {

              System.out.println("Input must be an integer ");

              input.nextLine();             }        }  

       System.out.println("The program executed correctly!");  } }

7 0
3 years ago
Other questions:
  • What exactly does the value recorded in a single dimension of a sift keypoint descriptor signify?
    15·1 answer
  • Will a tablecloth that is 155 cm long cover a table that is 1.6 m long?
    12·2 answers
  • Why is the len ( ) function useful when using a loop to iterate through a stack?
    6·1 answer
  • Software is nothing but a piece of code or set of instructions written in a chip to run a hardware device on the Computer. O Tru
    14·1 answer
  • Given the availability of an ifstream object named input, write the other statements necessary to read an integer into a variabl
    6·1 answer
  • A single-user/single-tasking operating system allows only one user to perform one task at a time. A real-time operating system g
    13·1 answer
  • Explain the term software dependability. Give at least two real-world examples which further elaborates
    9·1 answer
  • Help me and i'll mark brainliest
    9·1 answer
  • Text Questions
    15·1 answer
  • What are the difference among the whole note, half note and quarter note ? (this is music)
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!