论头文件

P1001 A+B Problem

Auto_Accepted @ 2022-12-21 16:51:57

RT,教以下代码能过:

#include <iostream>//注意这里!!!!
using namespace std;
int a , b;
main(){
    scanf("%d%d" , &a , &b);
    printf("%d" , a + b);
}

尤其注意头文件


by Auto_Accepted @ 2022-12-21 16:52:09


by HeCao2008 @ 2022-12-21 16:52:54

有问题吗???


by HeCao2008 @ 2022-12-21 16:53:00

@xuyiluo2


by Auto_Accepted @ 2022-12-21 16:53:04

注:C++20过了,C++98 CE


by Auto_Accepted @ 2022-12-21 16:54:53

@HeCao2008

 iostream

scanf、printf

能共存?


by srds_cbddl @ 2022-12-21 16:56:02

@xuyiluo2 盲猜是因为 20 比 98 新,可能做了一些改动。


by sunrise1024 @ 2022-12-21 16:56:12

@xuyiluo2 凭什么不能,另外可能在低版本 iostream不包含scanf,你不CE谁CE?


by sunyizhe @ 2022-12-21 16:56:41

@xuyiluo2 什么鬼,我试试


by HeCao2008 @ 2022-12-21 16:57:55

@xuyiluo2 那么就代表20能兼容,98不能兼容呗,而且似乎可以bdfs(


by sunrise1024 @ 2022-12-21 16:58:26

@HeCao2008 一直能兼容啊


| 下一页