Homework Introduction

主要内容:

  • cin 和 cout 格式化输入输出
int a = 100;
cout << a << endl; // 默认十进制
cout << dec << a << endl;
cout << oct << a << endl;
cout << hex << a << endl;

cout << "cat" << endl;
cout << setw(10) << "cat" << endl;
cout << setfill('*') << setw(10) << "cat" << endl;
cout << setfill('*') << setw(10) << "blackcat1995" << ".com" << endl;
cout << setfill('*') << setw(2) << "blackcat1995.com" << endl;
  • scanf 和 printf 格式化输入输出
#include <cstdio>  

int main(){

	int n;
	scanf("%d", &n);
	printf("a = %d\n", n);
	printf("Hello cat.");
	
	return 0;
}

Problem

Please claim the assignment to see the problems.
Status
Live...
Problem
3
Open Since
2024-2-6 0:00
Deadline
2036-8-23 23:59
Extension
24 hour(s)