am-kernels/tests/cpu-tests/tests/sum.c
2021-08-11 16:46:45 +08:00

14 lines
145 B
C

#include "trap.h"
int main() {
int i = 1;
volatile int sum = 0;
while(i <= 100) {
sum += i;
i ++;
}
check(sum == 5050);
return 0;
}