summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorAidenRushbrooke <72034940+AidenRushbrooke@users.noreply.github.com>2021-11-07 01:23:19 +0000
committerAidenRushbrooke <72034940+AidenRushbrooke@users.noreply.github.com>2021-11-07 01:23:19 +0000
commitf8b888716211b78900db62ede497fa4ac2100c00 (patch)
tree3ea66c732de6abb95b10e708d0ab33651cb6b327 /src/main.c
parentd3046e3b1481cf6d190b8fcb814985e29852b5eb (diff)
downloadesotericFORTRAN-f8b888716211b78900db62ede497fa4ac2100c00.tar.gz
esotericFORTRAN-f8b888716211b78900db62ede497fa4ac2100c00.zip
Basic floating point support and small improvements to error handing
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/main.c b/src/main.c
index 729227f..055bc9d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,12 +1,9 @@
#include <stdio.h>
int main(){
-int a;
-a=5.0;
-if(a<2.0){
-a=a+5.0;
+float a;
+a=6;
+if(a>2){
+a=a+0.5;
}
-else {
-a=a-3.0;
-}
-printf("%d",a);
+printf("%f",a);
}