我的简单程序的C编程帮助 [英] c programming help for my simple program
本文介绍了我的简单程序的C编程帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
能给我一个简单的c例子,该程序从用户那里输入并在您刚刚输入句子时显示:并且显示用户输入的内容
could you give me a simple c example which program take input from user and display as you just entered sentences is: and display what user entered
推荐答案
转到此处 [
您需要:
- 对
C
编程语言非常基本的了解.- 了解
fgets
的工作方式(与stdin
一起使用).- 了解
printf
的工作方式可以.You need:
- A very basic understanding of the
C
programming language.- Knowing how
fgets
works (withstdin
).- Knowing how
printf
works.
这是整个模块.
This is the whole module.
using System; using System.Runtime.InteropServices; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { Console.WriteLine("Enter text to display:"); var input = Console.ReadLine(); Console.WriteLine(input); //Last read line is just to make the console stay open Console.ReadLine(); } } }
这篇关于我的简单程序的C编程帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文