Question: 1 . Write a program that will read input from the text file. Answer the problem below. Input: ( Input FileName: Lab 9 _ Task
Write a program that will read input from the text file. Answer the problem below. Input: Input FileName: LabTaskinput.txt
The following n lines each represent a data set. Each data set will be formatted according to the following description:
A single data set consists of a line X Y where X is the number of brains the zombie eats and Y is the number of brains the zombie requires to stay alive.
Output: For each data set, there will be exactly one line of output. This line will be MMM BRAINS" if the number of brains the zombie eats is greater than or equal to the number of brains the zombie requires to stay alive. Otherwise, the line will be NO BRAINS".
Sample Input
Sample Output
NO BRAINS
MMM BRAINS
MMM BRAINS
Modified Zombies Problem Set:
The program will count how many zombies that are still alive in each set of inputs:
Example:
Output: The output should be in a text file. Note Filename: LabTaskOutput.txt
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
