63 218
Assignments Done
99,3%
Successfully Done
In July 2018

Answer to Question #53585 in Perl for zexy

Question #53585
Question: What will be printed? Why?

$a="no"; # assign variable

if ($a) { #Loop test for variable $results = "Yes!"; #Success?} else { #or maybe $results = "no"; #Failure}
print $results; #Let's find out
Expert's answer
Answer:
Program in such a way as it is written will not work, because he has syntax errors .
Character # refers to the entire line a comment.
After correction program has look:
$a="no"; # assign variable
if ($a) {
#Loop test for variable
$results = "Yes!";
#Success?
}
else {
#or maybe
$results = "no";
#Failure
}
print $results; #Let's find out

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions