Advertisement
Guest User

Untitled

a guest
Apr 21st, 2019
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.19 KB | None | 0 0
  1. //
  2. //  main.c
  3. //  Falling Desks
  4. //
  5. //  Created by Ahmed Fahmy on 4/22/19.
  6. //  Copyright © 2019 Ahmed Fahmy. All rights reserved.
  7. //
  8.  
  9. #include <stdio.h>
  10. #include "limits.h"
  11.  
  12. int main(int argc, const char * argv[]) {
  13.   // insert code here...
  14.  
  15.     //  const int n = 1e6 +9;
  16.     // const int m = 1e6 +9;
  17.  
  18.  
  19.   int A[200000];
  20.   int B[200000];
  21.  
  22.     //A is the array of the well contains the diameter values in top-down order
  23.     //B is the array of the entered disks contains the diameter of disks values in dropping order
  24.     //N the well disks number
  25.     //M the rings number
  26.  
  27.   int i=0, j=0, N, M;
  28.  
  29.   printf("Please enter the Well Deep in meters : ");
  30.   scanf("%ld",&N);
  31.  
  32.   printf("Please enter the number of the Disks dropped : ");
  33.   scanf("%ld",&M);
  34.  
  35.   printf("Please assign the diameter of each concrete rings respectively in top-down order : ");
  36.   for (i=0; i<N; ++i)
  37.     scanf ("%ld",&A[i]);
  38.  
  39.   printf("Please assign the diameter of each concrete Disk respectively in they are to be dropped : ");
  40.   for (j=0; j<M; ++j)
  41.     scanf ("%ld",&B[j]);
  42.  
  43.   int r,s;
  44.   for(r=0; r<N ; ++r) printf("%ld",A[r]);
  45.   for(s=0; s<N ; ++s) printf("%ld",B[s]);
  46.  
  47.  
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement