cpp

A01.03 对齐输出

step1

写程序入口主要函数。

#include <iostream>
using namespace std;

int main() {

    return 0;
}

step2

命名变量并赋予合适的类型。

#include <iostream>
using namespace std;

int main() {
    int a,b,c;

    return 0;
}

step3

从键盘读取输入数据到对应变量。

#include <iostream>
using namespace std;

int main() {
    int a,b,c;

    cin >> a >> b >> c;

    return 0;
}

step4

根据题意要求输出答案内容。

#include <iostream>
using namespace std;

int main() {
    int a,b,c;

    cin >> a >> b >> c;
    printf("%8d %8d %8d",a,b,c);

    return 0;
}

w. 微信订阅号

  1. 智数精英-关注中小学程序设计及相关讨论
  2. 随话录-记录小朋友们的成长时光
  3. 西山征途-关注大学生成长、学习和生活

欢迎关注“智数精英”订阅号 欢迎关注“随话录”订阅号 欢迎关注“西山征途”订阅号


b. 返回

h. 首页