Answer:
## http://pastebin.com/nQWtHb3B
#use above link for formatted program #Python3
c=[float(cord) for cord in input('Enter a point with 2 coordinate :').split(' ')]
base=[0,0]
w=10
h=5
if((abs(c[0]-base[0])<= float(w)/2) and (abs(c[1]-base[1])<= float(h)/2)):
print('Point (',c[0],', ',c[1],') is in the rectange')
else:
print('Point (',c[0],', ',c[1],') is not in the rectange')
Answer:
Option b outFile.open("outputData.out");
Explanation:
In C++, there are several classes given to handle output and input of characters to or from files. They are:
- ofstream that write on files
- ifstream that read from files
We can use an object of ofstream to hold the contents that we wish to output to an external file. The general syntax is as follows:
ofstream_obj.open(file_name)
This will create a file with a specific file name and it possesses all the contents from the obstream_obj.
False i doesnt shows anything like this
Answer:
Following is attached the code that works accordingly as required. It reads in characters from standard input and outputs the number of times it sees an 'a' followed by the letter 'b'. All the description of program is given inside the code as comments.
I hope it will help you!
Explanation: