Не работает system("pause") и getch() - C (СИ)
Формулировка задачи:
#include <stdio.h> #include <stdlib.h> #include <conio.h> int main(void) { int i=0,n=0,j=0,; double Array[20]; printf("Input size of Array : "); scanf("%d",&n); if( (n<3) || (n>20)) { printf("Error input size \n "); getch(); return 0; } srand(5); printf("\n Array : "); for(i=0;i<n;i++) { Array[i]=rand()%100; printf("%7.2lf ", Array[i]); } double current=Array[0]; for (j=0; j<n;j++) { if(current <=Array[j]) current=Array[j]; else { printf("The Array isn't decreasing"); return 0; } } printf("The Array is decreasing"); return 0; getch(); }
Решение задачи: «Не работает system("pause") и getch()»
textual
Листинг программы
if(current <=Array[j]) { current=Array[j]; } else { // ...
ИИ поможет Вам:
- решить любую задачу по программированию
- объяснить код
- расставить комментарии в коде
- и т.д