add test case

main
origami-b 12 months ago
parent 7dd4ceb63f
commit 36f76b2a4a

@ -0,0 +1,8 @@
float a,b;
int main(){
a=10.2;
b=5.3;
float c=a*2+b*1.1+3.6;
return c;
}

@ -0,0 +1,5 @@
float a[2] = {1.2, 1.3};
int main(){
a[1] = 3.3;
return 0;
}

@ -0,0 +1,6 @@
const int x=4;
int main(){
const int x=4;
return x;
}

@ -0,0 +1,7 @@
const float a[5]={0.2,1.33,2.4,3.5,4.6};
const int b = 3;
float c = a[b + 1];
int main(){
return a[4] + c;
}

@ -0,0 +1,13 @@
float a,b,c;
void add(float a,float b){
c=a+b;
return;
}
int main(){
a=3.3;
b=2.8;
add(a,b);
return c;
}

@ -0,0 +1,15 @@
int a;
int main(){
a = -10;
if( a>0 ){
return 1;
}
else{
if(a > -5) {
return 2;
}
else {
return 0;
}
}
}

@ -0,0 +1,21 @@
int a;
int b;
int main(){
b=0;
a=3;
int sum = 0;
while(b<10){
b = b+1;
while(a > 0) {
a = a-1;
sum = sum + b;
}
sum = sum + b;
}
while(b < 12) {
sum = sum + 1;
b = b+1;
}
return sum;
}

@ -0,0 +1,22 @@
int a;
int b;
int main(){
a = getint();
b = getint();
if ( a == b ){
return 1;
}
if ( a <= b ){
return 2;
}
if ( a < b ){
return 3;
}
if ( a != b){
return 4;
}
if ( a >= b){
return 5;
}
return 0;
}
Loading…
Cancel
Save