Answer:
dataFile << salary;
Explanation:
To write salary to a file (payroll.dat) using ofstream, you make use of the following instruction:
<em>ofstream dataFile;
</em>
<em>myfile.open ("payroll.dat");
</em>
<em>myfile <<salary;
</em>
<em>myfile.close();</em>
<em />
This line creates an instance of ofstream
<em>ofstream dataFile;
</em>
This line opens the file payroll.dat
<em>myfile.open ("payroll.dat");
</em>
This is where the exact instruction in the question is done. This writes the value of salary to payroll.dat
<em>myfile <<salary;
</em>
This closes the opened file
<em>myfile.close();</em>
<em />
<em />
You have to wait a little bit until you can give the person brainiest. You mostly give it to someone who gave a great answer. :)
Answer:
Here is c program:
#include<stdio.h>
#include<conio.h>
void main()
{
//Variable declaration
//array to hold 6 values you can change this as needed
float nums[6];
//integer i is for loop variable
int i;
//to hold maximum value
float max=0.0;
//clear screen
clrscr();
//iterate 6 times you can change as per your need
for(i=0;i<6;i++)
{
printf("Enter a number:");
scanf("%f",&nums[i]);
//check if entered value is greater than previous value
//if it is greater then assign it
if(nums[i]>max)
max = nums[i];
}
//print the value
printf("The largest number entered was %f",max);
getch();
}
Explanation:
The correct answer is 1: B new tech and 2:C we can tell by the way businesses are incorporating things like social media like how Wendys got more popular because of their sassy tweets