#include <stdio.h> int cal(int x){ if(x<1) return x; if(x>=1 && x<10) return (2*x-1); elxe return (3*x-11); } int main(){ int a; scanf("%d",&a); printf("%d",cal(a)); return 0; } /* Main.c: In function 'cal': Main.c:5:3: error: 'elxe' undeclared (first use in this function) elxe return (3*x-11); ^ Main.c:5:3: note: each undeclared identifier is reported only once for each function it appears in Main.c:5:8: error: expected ';' before 'return' elxe return (3*x-11); ^ Main.c:8:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ */ |
Double click to view unformatted code.