Write a c program that reads a .img file by rows and columns and
prints out the arrays. The .img file contains h(the
height) and w(the width) of the text size. An example .img
file would be:
2 4
DFJSK
HJ5JF
HFDY5
Write a Fortran program that is able to read in
the data file.
The file has lines with the structure: 19990122 88888 30.5
Where:
i) the first is an 8 digit code with the date: yyyymmdd (yyyy is
the year, mm is the month, and dd is the day)
ii) the second is the five digit odometer reading of a car
iii) the third is the amount of fuel put into the car on that
date to fill the tank...
Write a C++ program that creates a file called
Readings.txt. Inside the file, your program must
create
a list. The list is composed of integer double pairs. There is one
pair per line. The integers are in
sequence (0, 1, 2, 3, ...) beginning with zero and ending with some
random value between 512 and
1024. The doubles should be random values between 50.000 and
90.000. The doubles only have 3
decimal places. The file should look like this (of...
Using OOP, write a C++ program that will read in a file of
names. The file is called Names.txt and should be located in the
current directory of your program. Read in and store the names into
an array of 30 names. Sort the array using the selection sort or
the bubblesort code found in your textbook. List the roster of
students in ascending alphabetical order. Projects using global
variables or not using a class and object will result in...
Write a
program that creates an output file named rand_nums.txt.
Open the file and write 100 random integers between -50 and +50
(inclusive) to the file. Be sure to handle any file IO exceptions.
Remember to close the file.
Write a
program that opens rand_nums.txt
for input.
Create two output files pos.txt
and
neg.txt.
Read through the input file, one line at a time, converting each
line into an integer (no exception handling, yet). If the number is
positive, write...
Done in C++, Write a program to read the input file, shown below
and write out the output file shown below. Use only string objects
and string functions to process the data. Do not use c-string
functions or stringstream (or istringstream or ostringstream) class
objects for your solution.
Input File
Cincinnati 27, Buffalo 24
Detroit 31, Cleveland 17
Kansas City 24, Oakland 7
Carolina 35, Minnesota 10
Pittsburgh 19, NY Jets 6
Philadelphia 31, Tampa Bay 20
Green Bay 19,...
write a Program in C++
Using a structure (struct) for a timeType, create a program to
read in 2 times into structures, and call the method addTime, in
the format:
t3 = addTime(t1, t2);
Make sure to use add the code to reset and carry, when adding 2
times. Also, display the resultant time using a function:
display(t3);
Write a C++ program to read a data file containing the velocity
of cars crossing an intersection. Then determine the average
velocity and the standard deviation of this data set. Use the
concept of vector array to store the data and perform the
calculations. Include a function called “Standard” to perform the
standard deviation calculations and then return the value to the
main function for printing.
Data to use. 10,15,20,25,30,35,40,45,50,55.
Please use something basic.
c++ Create a program that creates a sorted list from a data
file. The program will prompt the user for the name of the data
file. Create a class object called group that contains a First
Name, Last Name, and Age. Your main() function should declare an
array of up to 20 group objects, and load each line from the input
file into an object in the array. The group class should have the
following private data elements: first name...
Write a program that takes three sets ’A’, ’B’, ’C’ as input
read from the file prog2 input.txt. The first line of the file
corresponds to the set ’A’, the second line is the set ’B’, and the
third line is the set ’C’. Every element of each set is a
character, and the characters are separated by space. Implement
algorithms for the following operations on the sets. Each of these
algorithms must be in separate methods or subroutines. The...