Question: Question 3 12 marks Write a program that reads name of a person and check if there are middlename(s), and then check if any of

 Question 3 12 marks Write a program that reads name of

Question 3 12 marks Write a program that reads name of a person and check if there are middlename(s), and then check if any of the middle names is 'Patrick'? The name should be entered with one space between firstname, middlename(s) and lastname. If Peter James is entered as name, the S output should be "This person has no middlenames". If Jesse Patrick Pieters is entered the output should be "This person has one of his middlenames as Patrick". Your program should work even if there is more than one middlename, for instance, for a name like Jesse Patrick Owens Pieters. Repeat the program until EXIT is entered at the prompt for full name. Your program should not use the ( operator to access a string element. Use appropriate string functions. You are not expected to validate the input, therefore your program works on the assumption that the input is entered in the specified format. The variable into which you read the full name should be the only string variable in your program. Submit the program and an output that shows the program being repeated atleast four times with different outcome for each iteration. of A sample output Thia person hes one of hismidlenases sa Patrick ter your full nanelfirst. niddio and last noses) iddi e ter your it s at anne Pieter, idie an jast as niddlenases Patri has ane of his i ta peroon nter your full nean( Fsrst. idle and last nanes) is persen has no sidsle nase ter your ful! Pirst, sidel, and last ) lliae Patriek adlena ntar your futil nane(first,idele and last nas) Press any key to continue. 83

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!