任务描述
使用转义字符,按照要求输出完整的格式。 例如,将下面一段话完整输出:
- "Exams decide all your life" is one of my favorite sayingss
可以这样:
Console.Write("\"Exams decide all your life\" is one of my favorite sayingss"):
-
编程要求
下面是一段摘自电影《超凡蜘蛛侠》的对话,Ben:"Listen to me, son"
Peter:"Yeah, go ahead"
Ben:"You are a lot like your father, Peter"
Ben:"But your father believed that if you could do good things for other people,
you had a moral obligation to do those things"
Ben:"Not choice. Responsibility"
Peter:"That is nice. That’s great"
现给出具体要求如下:使用转义字符相关知识,按格式完整输出
可以使用不同的转义字符或输出函数
在右侧Begin至End中间的补全代码using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace B3
{
class b3
{
static void Main(string[] args)
{
/********** Begin *********/
//请运用转义字符相关知识
//按照任务要求将一段文字完整打印出来
string abc = "Ben:\"Listen to me, son\"";
string abd = "Peter:\"Yeah, go ahead\"";
string acd= "Ben:\"You are a lot like your father, Peter\"";
string adb= "Ben:\"But your father believed that if you could do good things for other people, you had a moral obligation to do those things\"";
string efg = "Ben:\"Not choice. Responsibility\"";
string fth= "Peter:\"That is nice. That’s great\"";
Console.WriteLine(abc);
Console.WriteLine(abd);
Console.WriteLine(acd);
Console.WriteLine(adb);
Console.WriteLine(efg);
Console.WriteLine(fth);
/********** End *********/
}
}
}