| C:\Users\pc\Documents\programming\New folder\guhghh.exe Process exited after 2.303 seconds with return value 3221225477 Press any key to continue
there's something wrong in this codes
i executed and compiled it the output will pop-out BLANK
#include <stdio.h>
int main(){
int r[10],a=0,i,e,op=0,s;
r[e]=rand()%50;
int b=0;b<10;b++;
int d= 0; d < 10; d++;
int c = 0; c < 10; c++;
printf("Please enter your choice: \n");
printf("1: Enter 1 to see all the elements\n");
printf("2: Enter 2 to see all elemnts of an array less than 25:\n");
printf("3: Enter 3 to see all elemnts of an array greater than or equal to 25:\n");
while (op!=4){
printf("4: Enter 4 to exit.\n");
scanf("%d",&a);
switch(a){
case 1:
printf("Random Generated Array's elements are: \n");
for(b=0;b<10;b++){
printf("%d",r[i]);
printf(" ");
}
printf("\n");
break;
case 2:
printf("Display element of array less than 25: \n");
for(c = 0; c < 10; c++){
if(r[i] < 25)
printf("%d",r[i]);
printf(" ");
}
printf("\n");
break;
case 3:
printf("Display element of array greater than or equal to 25:\n");
for(d= 0; d < 10; d++){
if(r[i] >= 25)
printf("%d",r[i]);
printf(" ");
}
printf("\n");
break;
case 4:
break;
default:
printf("Please enter the correct choice.\n");
}
}
getch();
}
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images