+ 1
I struggle solving this...
Q: Write a program to output the following: "Everything you can imagine is real." - Picasso The format of the output should exactly match the above text. My input: cat(â\âEverything you can imagine is real.â - Picassoâ\â) Output: error Iâm not sure what I did wrong there. Could someone please also explain why it suggests me to use cat instead of print? Thank you in advance
4 Answers
+ 3
The symbols you are using are not quote symbols.
If you want include quote symbol ' " ' , or special symbols, just use escape symbol before it like \" in String.
This works :
cat("\"Everything you can imagine is real.\" - Picasso")
edit:
from search I got,
print() adds line numbers but cat() don't adds..
0
I think you probably want the second escaped double quote to appear after the word "real."
By now, you have it after the word "Picasso"
0
Try this :
str1 = "\"Everything you can imagine is real.\""
str2 = "- Picasso"
str3 = paste ( str1,str2)
cat (str3)
0
JayaKrishna thans sir you help me to solve this question