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
eduard
3 years ago
6

Given the availability of an ifstream object named input, write the other statements necessary to read an integer into a variabl

e datum that has already been declared from a file called rawdata. Assume that reading that one integer is the only operation you will carry out with this file. (Note: write just the statements, do not define a main function.)
Computers and Technology
1 answer:
tatiyna3 years ago
4 0

Answer:

input.open("rawdata");

input>>datum;

input.close();

Explanation:

ifstream objects maintain a filebuf object as their internal stream buffer, and perform operations like input/output on the available associated files.

In above statements.

                            input.open("rawdata");

  • The associated file named rawdata is opened.

                            input>>datum;

  • The integer from the file is read into already declared variable datum.

                             input.close();

  • Input stream is closed.
You might be interested in
Define function print_popcorn_time() with parameter bag_ounces. If bag_ounces is less than 3, print "Too small". If greater than
Gnoma [55]

Answer:

public static void print_popcorn_time(int bag_ounces){

       if(bag_ounces<3){

           System.out.println("Too Small");

       }

       else if(bag_ounces>10){

           System.out.println("Too Large");

       }

       else{

           bag_ounces*=6;

           System.out.println(bag_ounces+" seconds");

       }

   }

Explanation:

Using Java prograamming Language.

The Method (function) print_popcorn_time is defined to accept a single parameter of type int

Using if...else if ....else statements it prints the expected output given in the question

A complete java program calling the method is given below

public class num6 {

   public static void main(String[] args) {

       int bagOunces = 7;

       print_popcorn_time(bagOunces);

   }

   public static void print_popcorn_time(int bag_ounces){

       if(bag_ounces<3){

           System.out.println("Too Small");

       }

       else if(bag_ounces>10){

           System.out.println("Too Large");

       }

       else{

           bag_ounces*=6;

           System.out.println(bag_ounces+" seconds");

       }

   }

}

3 0
3 years ago
Identify the flaws / limitations in the following ConvertToNumber method:
lions [1.4K]

Answer:

Flaws and limitations identified in this program includes;

1.There was a not necessary usage of variable retrieval. Would have made use of canConvert.

2. Looking at the program, one will notice numerous typos. One of which is the fact that in JAVA we make use of Boolean instead of bool.

3.We rather use Integer.parseInt in JAVA and not Int16, cant make use of Int16.

4. The exception cant be printed

5. JAVA makes use of checkConversion instead of convertNumber as used in the program.

6. It cant work for decimal numbers, 0 and big integers.

Explanation:

See Answer for the detailed explaination of the flaws and limitations identified in the program.

4 0
3 years ago
I know I should add Family and food by default (and I will) But I wanna hear some more from other peoples perspective
lidiya [134]

Answer:

you could say something like your friends or your pets if you have any pets you could say something like you are grateful that we now have 3 vaccines for the Coronavirus or like you are grateful for your hobbies because it gives you something to do in your free time.

Explanation:

i hope this helps.

7 0
3 years ago
Read 2 more answers
When creating a user generated function, what procedure is followed?
marin [14]

When creating a user-generated function, what procedure is followed d) all of the above.

<h3>What are the three factors of user-described characteristic?</h3>

A user-described characteristic has 3 essential additives which might be characteristic declarations, characteristic definition and characteristic called.

The characteristic prototypes are used to inform the compiler approximately the variety of arguments and approximately the specified datatypes of a characteristic parameter, it additionally tells approximately the go-back kind of the characteristic. By this information, the compiler cross-assessments the characteristic signatures earlier than calling.

Read more about the prototype :

brainly.com/question/7509258

#SPJ1

6 0
2 years ago
How's your day :D I hope its goin well you amazing person :D
Rainbow [258]

Answer:

You are an awesome and amazing person!!

Explanation:

7 0
3 years ago
Read 2 more answers
Other questions:
  • Do most facebook and twitter users access the platform from their personal computers?
    6·2 answers
  • A. True
    8·2 answers
  • Will give brainliest!!!!!!!!!!!!
    6·2 answers
  • The ____ command is used to disconnect a datatable object from the database. (
    15·2 answers
  • Which of the following would an interactive media professional most likely need? A.a high school diploma
    15·1 answer
  • A user has a network device that streams media to the LAN. The device is visible on the network. All PCs on the LAN can ping the
    13·1 answer
  • ¿que significa “TTAQMMQMPDATLSPLNDTMGCCLFEQMMPQTEIUMDR” ?
    5·2 answers
  • How are keyboards applied in the real world
    13·1 answer
  • Which of the following lines of code correctly defines a function called combine? OA define "combine(a, b, c)" as: B. define(com
    9·1 answer
  • HELP 100 points
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!