我们如何使用c#为此编写代码.. [英] how we can write coding using c# for this..

查看:62
本文介绍了我们如何使用c#为此编写代码..的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

输入

输入文件中的每一行都将包含在语句中替换/ * input * /所需的一个或多个单词。



输出

输出将包含随/ * input * /提供的语句被替换为输入文件中的单词。



样品输入

睡觉

玩视频游戏

旅行

工作



样品输出

今年夏天我要睡觉了!

我今年夏天要玩电子游戏!

今年夏天我要去旅行!

今年夏天我要上班了!



我们如何用c#编写代码....

Input
Each line in the input file will contain one or more words needed to replace /*input*/ in the statement.

Output
The output will contain the statement provided with the /*input*/ being replaced with the word or words from the input file.

Sample Input
sleep
play video games
travel
work

Sample Output
I am going to sleep this summer!
I am going to play video games this summer!
I am going to travel this summer!
I am going to work this summer!

how we can write coding using c#....

推荐答案

看起来像家庭作业

使用替换功能

例如

It''s seem like homework
use replace function
e.g.
string s = "hi hello"; 
s = s.replace("hello","All");//Note : string is case sensetive "hello" & "Hello" are different



快乐编码!

:)


Happy Coding!
:)


这篇关于我们如何使用c#为此编写代码..的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆