- 博客(3)
- 收藏
- 关注
原创 C语言输入输出
1.输入函数 格式化规定符 1.scanf函数 (1)输入一个整型 #include <stdio.h> int main() { int i; scanf("%d",&i); printf("%d\n",i); return 0; } (2)输入一串整型数据(按空格分开的输入) #include <stdio.h> int main() { int i,j; while(scanf("%d %d",&i,&j)!.
2021-09-03 14:15:35
224
原创 C++输入
C++输入 1.单元素输入整数(处理程序在while内书写) #include <iostream>using namespace std; int main() { int a, b; while(cin >> a >> b) { cout << a + b << endl; } return 0; } 2.单元素输入字符(处理程序在while内书写) int main() { char ch; while(cin>>ch){ c
2021-06-18 15:14:28
610
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅