SHARE
TWEET

Untitled

a guest Nov 17th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. #include "functions.h"
  3. #include <stdlib.h>
  4. #include <string.h>
  5.  
  6.  
  7. void clearScreen(void){
  8.     printf("\033[H\033[J");
  9. }
  10.  
  11.  
  12. StringorInt Initial_Questions(void){
  13.     StartOverMyG :
  14.     ;
  15.     clearScreen();
  16.     char stringOrIntegarArrayChoice;
  17.  
  18.     puts("Do you want to create a String or an Integer Array?");
  19.     puts("Type I for an Integer Array or S for string Array");
  20.  
  21.     scanf("%c", &stringOrIntegarArrayChoice);
  22.     switch(stringOrIntegarArrayChoice){
  23.  
  24.         case 'I':
  25.             return INTEGAR;
  26.             break;
  27.  
  28.         case 'S':
  29.             return STRING;
  30.             break;
  31.  
  32.         default:
  33.             goto StartOverMyG;
  34.     }
  35.  
  36. }
  37.  
  38.  
  39. ArrayData choose_Array_Member_Amount(InitialQuestionP StringorInt){
  40.  
  41.     StartOverMyG :
  42.     ;
  43.     clearScreen();
  44.     int ArrayMemberTotal;
  45.     int choice = StringorInt();
  46.     switch(choice){
  47.  
  48.         case INTEGAR:
  49.             puts("How many members do you need in your Integer Array?");
  50.             break;
  51.  
  52.         case STRING:
  53.             puts("How many members do you need in your String Array?");
  54.  
  55.         default:
  56.             goto StartOverMyG;
  57.  
  58.     }
  59.  
  60.     scanf("%i", &ArrayMemberTotal);
  61.  
  62.     ArrayData Array_Data;
  63.     Array_Data.ArrayMemberTotal = ArrayMemberTotal;
  64.     Array_Data.StringorInt = choice;
  65.  
  66.     return Array_Data;
  67. }
  68.  
  69.  
  70.  
  71.  
  72.  
  73. void create_Array(ArrayMemberTotalP Data){
  74.     StartOverMyG :
  75.     ;
  76.     ArrayData ArrayCreator = Data(Initial_Questions);
  77.  
  78.     switch(ArrayCreator.StringorInt){
  79.  
  80.         case INTEGAR:
  81.         puts("i am Int");
  82.         break;
  83.  
  84.         case STRING:
  85.         puts("I am Groot");
  86.         break;
  87.  
  88.         default:
  89.             goto StartOverMyG;
  90.     }
  91. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top