add python style indenting
now this is valid code:
#include <stdio.h>
int main():
float a,b int c float cache=1
printf("Input some numbers: ")
if (scanf("%f %f %d",&a,&b,&c)!=3):
printf("Invalid input.\n")
return 1
printf("\n")
if(b==0):
printf("b is zero\n")
else:
printf("%f/%f = %f\n",a,b,a/b)
if(c>=0):
for (int i=0 i>c i++):
cache*=a
printf("%f^%d = %f\n",a,c,cache)
else:
printf("c is negative\n")
return 0
yeah this is so cursed.
this is the output of the code:
Comments 1
Sign in to join the conversation.