Results 1 to 25 of 30

Thread: C

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date: Apr:2010
    Location: Veliko Tarnovo
    Posts: 19

    C

    , :
    (Xi,Yi) N . 5<N<30 . , ( , ..) , . - . , , .
    :
    Code:
    void main() {
       int n,i;
       float x[M],y[M];
       printf("Vavedete broj na tochkite mejdu 5 i 30 \n");
       scanf("%d",&n);
       while (n<5||n>30){
          printf("Broqt trqbwa da e mejdu 5 i 30. Vavedete otnovo \n");
          scanf("%d",&n);}
       for(i=0;i<n;i++){
          printf("Vavedete koordinata X na %d tochka",i+1);
          scanf("%f",&x[i]);
          printf("Vavedete koordinata X na %d tochka",i+1);
          scanf("%f",&x[i]);}
    . - .

  2. #2
    Deleted User 4eRNoBiL's Avatar
    Join Date: Oct:2005
    Location:
    Posts: 739
    - , x[] y[]. , - . - .

    - , , Y.

    . , , :
    - , distance[A][B], A B . , . , - , , , B.

    - - ( , ), , , - , -. .

    -.

    , .
    Fujistu Lifebook E756 | Core i7-6500U / 400MHz-3.1GHz | 8 GB DDR4-2133 | Samsung PM871 / 256 GB SSD | 15" 1920x1080 | Manjaro Linux + kernel 4.19

  3. #3
    Registered User
    Join Date: Apr:2010
    Location: Veliko Tarnovo
    Posts: 19
    - #define M 30 Y . distance .

  4. #4
    Deleted User 4eRNoBiL's Avatar
    Join Date: Oct:2005
    Location:
    Posts: 739
    - :
    Code:
    distance[index1][index2] = 5.43;
    distance[index3][index4] = var1;
    index1, index2 .. . , , -.
    Fujistu Lifebook E756 | Core i7-6500U / 400MHz-3.1GHz | 8 GB DDR4-2133 | Samsung PM871 / 256 GB SSD | 15" 1920x1080 | Manjaro Linux + kernel 4.19

  5. #5
    Registered User
    Join Date: Apr:2010
    Location: Veliko Tarnovo
    Posts: 19
    .

  6. #6
    -==-
    Join Date: Sep:2003
    Location:
    Posts: 6,444
    . .1 .1 . 1 2 2 1 , . .
    He who asks is a fool for five minutes, but he who does not ask reamins a fool forever. Old Chinese saying
    Quote Originally Posted by worm4 View Post
    a .

  7. #7
    Registered User ined's Avatar
    Join Date: Nov:2006
    Location: Varna
    Posts: 1,078
    - "" dist[0][0], dist[1][1] ..
    - - .

    - .1 .2 2. .1 .
    ASRock B85 Pro4, Pentium G3240, DD3 8GB/1333MHz, 120GB SSD + 1TB + 640GB HDD
    Gigabyte GV-R657OC-1GI, CM B500, ASUS 24B1S1, LCD SAMSUNG SM931BW, 173

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |