Results 1 to 25 of 30
Thread: C
Hybrid View
-
3rd December 2014 17:11 #1Registered 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]);}
-
3rd December 2014 17:46 #2
- , 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
-
3rd December 2014 17:53 #3Registered User
Join Date: Apr:2010
Location: Veliko Tarnovo
Posts: 19
- #define M 30 Y . distance .
-
3rd December 2014 18:00 #4
- :
index1, index2 .. . , , -.Code:distance[index1][index2] = 5.43; distance[index3][index4] = var1;
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
-
3rd December 2014 18:03 #5Registered User
Join Date: Apr:2010
Location: Veliko Tarnovo
Posts: 19
.
-
3rd December 2014 19:52 #6-==-
Join Date: Sep:2003
Location:
Posts: 6,444
-
3rd December 2014 20:02 #7
- "" 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




Reply With Quote

Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in