|
|
вернуться в форумWhy compilation error? but My compiler run this Послано Monir 13 окт 2019 01:00 #include<stdio.h> #include<math.h> int main(){ int n; scanf("%d",&n); if(n==0){printf("%d",1);} else if(n>0){printf("%d",(n*(n+1))/2);} else{ n=fabs(n); printf("%d",-1*(((n*(n+1))/2)-1)); } return 0; } Re: Why compilation error? but My compiler run this Послано XJS_XY 30 ноя 2019 13:49 Edited by author 30.11.2019 13:52 |
|
|