Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
113898 施宸雨 能否被3和5整除 C Compile Error 0 MS 0 KB 173 2025-03-16 20:20:37

Tests(0/0):


Code:

#include <stdio.h> int main(){ int n; scanf("%d",&n); if (n % 3 == 0 and n % 5 == 0){ printf("can"); } else{ printf("cannot"); } return 0; }


Run Info:

Main.c: In function 'main':
Main.c:7:17: error: expected ')' before 'and'
  if (n % 3 == 0 and n % 5 == 0){
                 ^
Main.c:5:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d",&n);
  ^