Sign in
gem5
/
public
/
gem5-resources
/
6fa28d899b09bed2ac775a6795c9a86122d5a5cd
/
.
/
src
/
riscv-tests
/
debug
/
programs
/
counting_loop.c
blob: 7c7d6002356e174de5bdc6a18296cd739c04e452 [
file
] [
log
] [
blame
]
#include
<stdio.h>
#include
<string.h>
#include
<stdint.h>
#include
<stdlib.h>
int
main
()
{
int
sum
=
0
;
int
counter
=
0
;
while
(
counter
<
10
)
{
counter
=
counter
+
1
;
sum
=
sum
+
counter
;
}
return
counter
;
}