here is the full code but still give me 0 as minimum??????
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#define NROWS 20
#define NCOLS 3
#define STATECOL 0
Type: Posts; User: xstudent
here is the full code but still give me 0 as minimum??????
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#define NROWS 20
#define NCOLS 3
#define STATECOL 0
negative values not allowed in the array and the element inside the array of arr all of type double
could you please give me an example of how to use 2 loops one to get the first...
well i dont need to know how many zerow i have i need to know what is the minimum value in my array which is not zero. ie if my array contains
(0,1,2,5,8,9,10,0,2,0,0,1,2) my min will be 1 as ...
i have an array (d_available[i])with some zero elements and non zero elements i want to find the minimum of the non zero elements (min_available)
this is what i thought will work but still gives...
i have an array (d_available[i])with some zero elements and non zero elements i want to find the minimum of the non zero elements (min_available)
this is what i thought will work but still gives...
:( my code dosent even generate the random numbers coz this is what i got when i added the line
for (i = 0; i < range; i++) printf ("%d:%d\n", i, a[i]);
0:0
1:0
2:0
3:0
i tried to do this
>
find_max(a,num)
using num not s this time
also
for(i=0; i<(num); i++){
a[i]=0;}
for(i=0; i<num; i++)
the output shold be the number of times that the maximum occures and the number of times that the minimum occures in the random numbers generated but i am getting zeros all the time ??
can anyone...
thanx i fixed the error but still has a warning says ( s has been used but never given a value) i know that s should be the size of the arry 'a' but i dunno how can i assign a value for s . also when...
many thanx to sean345 here is my full code but again i
cant fix the error it will be great help if sean345 or someone else can help me with it
code:
#include <stdlib.h>
#include...
sorry but i just tried to run the programme and i got an error message :
function pic has not been declard in the line
pic(a,range,num);
i am using a compiler called Salford Plato
thanx alot i will try and do the rest 2moro and post it if i had any problem
thanx again
hi
i am writting a prgrame to do the following
generate a random numbers in a given range
count the occurrences of each number and return the total in arry 'a'
find the maximum integer in the...