sysy-data/functional_c/sy/32_while_if_test2.sy

25 lines
271 B
Plaintext
Raw Normal View History

2024-04-14 22:20:29 +08:00
#include "sylib.h"
int ifWhile() {
int a;
a = 0;
int b;
b = 3;
if (a == 5) {
while(b == 2){
b = b + 2;
}
b = b + 25;
}
else
while (a < 5) {
b = b * 2;
a = a + 1;
}
return (b);
}
int main(){
return (ifWhile());
}