IOPanel

  IOPanel > > >

, , , .

:

, 100 : 1 my_fill ...
 
04-12-10, 12:39   #1 ( )
IO Member
 
   Jigit
 
: Sep 2007
: 690

,
100 :
1 my_fill - " 30.00 -1000.00.
, .

2 my_print - my_fill ( M x N) . ( ). , .

, 1 :
:
#include<stdio.h>
#define M 6
#define N 8

    void my_fill(a[][])
    {
        float d;
        for(i=0;i<M;i++)
        {
            for(j=0;j<N;j++)
            {
                scanf("%f",&d);
                if((d>30.00) && (d<1000.00))
                    a[M][N]=d;
            }
        }
    }
? .

- 2 ? ' ?



Jigit   
04-12-10, 14:51   #2 ( )
IO Folding Team
 
: May 2008
: 2,099

-
IF, 20.00 IF ( ) "" ...
DO WHILE ....
__________________

^^ ! ^^

- ?!
the crazy boy   
04-12-10, 17:33   #3 ( )
IO Member
 
   Jigit
 
: Sep 2007
: 690

, ( )
2 ?
Jigit   
04-12-10, 18:47   #4 ( )
IO Folding Team
 
: May 2008
: 2,099

" 1 2 ) ?
" ...
__________________

^^ ! ^^

- ?!
the crazy boy   
04-12-10, 18:56   #5 ( )
IO Gadgets
 
   iakovl
 
: Jan 2007
: 13,202

... 2 ?
6*8.... 2 1...
2 X * 2
__________________
Device: Gnote ROM: CM9 #7 Kernel: stock Modem:LB2
Main: E8400, Asus P5Q pro, 2*2gb G.skill PI DDR900, Perc 5/i HD103UJx4 RAID5 , wd3200aaks, HD4850, P180, VX450W, audigy 2 zs platinium pro, HD595, DELL 2709W
: 7ZIP , Thermalright HR-5 , Arctic-Cooling Accelero S1 Rev.2 , Scythe Kaze Master 5.25, Cruzer Titanium ,Seagate FreeAgent USB 2.0 500gb, WD My Book Home Edition 500gb otterbox impact, Scythe Kamazo 2 eSata, iTwin
iakovl   
05-12-10, 19:07   #6 ( )
IO Member
 
   Jigit
 
: Sep 2007
: 690

', :(" ( ))

:
#include<stdio.h>
#define M 2
#define N 3
void my_fill(float a[][N]);

void my_fill(float a[][N])
    {
        int i,j;
        for(i=0;i<M;i++)
        {
            for(j=0;j<N;j++)
            {
                scanf("%f",&a[i][j]);
                while((a[i][j]<0) || (a[i][j]>10)){
                    scanf("%f",&a[i][j]);}
            }}}
void my_print(float a[][N])
{
    int i,j;
    for(i=0;i<M;i++)
        {
            for(j=0;j<N;j++)
            {
                printf("%f\t",a[i][j]);
            }
            printf("\n");
    }}
    


void main() 
{
    char check;
    float first_arr[M][N],second_arr[M][N];
    printf("To use the first two dimensional array press a\n");
    printf("To use the second two dimensional array press b\n");
    scanf("%c",&check);

    
    my_fill(a);
    my_print(a);
        
}
Jigit   
05-12-10, 19:33   #7 ( )
IO Folding Team
 
: May 2008
: 2,099

' MAIN
( :
:
void my_fill(float a[][N]);
)

' -

:
void my_fill(float a[][N])
    {
        int i,j;
        for(i=0;i<M;i++)
        {
            for(j=0;j<N;j++)
            {
                scanf("%f",&a[i][j]);
                while((a[i][j]<0) || (a[i][j]>10)){
                    scanf("%f",&a[i][j]);}
            }}}
3 , 5 30 1000 , 30 1000, ...
__________________

^^ ! ^^

- ?!
the crazy boy   

« C | JAVA »



/ C (,,) ofir 1 28-01-10 17:00
( ) DXM 7 07-12-08 1:03
. . :) Vidati 12 13-08-08 19:11
? DR-EVIL 9 21-03-08 19:36


GMT +3. 16:37.





: vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO
IOPanel.net