6 months

Discussion in 'Programming General' started by Manipultor, Mar 24, 2014.

6 months
  1. Unread #1 - Mar 24, 2014 at 3:11 AM
  2. Manipultor
    Joined:
    Mar 16, 2014
    Posts:
    178
    Referrals:
    0
    Sythe Gold:
    0

    Manipultor Active Member
    Banned

    6 months

    So i'm in my first year of programming computer systems, so i want to know if in this 6 months we are in the right track, because if we're too slow, today i'm going to have a test, we need to use vectors.

    This are the exercises that we did on school, do you think we're on the right way, or to slow for 6 months,(sorry lol i'm portuguese so somethings are in portuguese)
    int n,num[30],i;
    void ler()
    { system("CLS");
    printf("Quantos elementos tem o vetor: ");
    scanf("%d",&n);
    for(i=1;i<=n;i++)
    { printf("num[%d]=",i);
    scanf("%d",&num);}}
    void listar()
    { system("CLS");
    printf("Elementos do vetor:\n\n");
    for(i=1;i<=n;i++)
    printf("num[%d]=%d\n",i,num);
    getch();}
    void listarentre()
    { int min,max;
    system("CLS");
    printf("Qual a numero minimo:");
    scanf("%d",&min);
    printf("Qual a numero maximo:");
    scanf("%d",&max);
    printf("NUMEROS ENTRE %d E %d:",min,max);
    for(i=1;i<=n;i++)
    if((num>min)&&(num<max))
    printf("\nNumero: %d",num);
    getch(); }
    void lsm()
    {int media,soma=0;
    system("cls");
    for(i=1;i<=n;i++)
    soma+=num;
    media=soma/n;
    printf("\n\nNumeros Superiores a media\n\n");
    for(i=1;i<=n;i++)
    { if(num>media)
    printf("%d\n",num); }
    getch(); }
    void acrescent()
    {
    int a;
    system("CLS");
    printf("Quantos quer acrescentar?");
    scanf("%d",&a);
    for(i=n+1;i<=n+a;i++)
    {printf("\nnum[%d]=",i);
    scanf("%d",&num); }
    n+=a; }
    void eleminar()
    {int e;
    int n,num[30],i;
    void ler()
    { system("CLS");
    printf("Quantos elementos tem o vetor: ");
    scanf("%d",&n);
    for(i=1;i<=n;i++)
    { printf("num[%d]=",i);
    scanf("%d",&num);}}
    void listar()
    { system("CLS");
    printf("Elementos do vetor:\n\n");
    for(i=1;i<=n;i++)
    printf("num[%d]=%d\n",i,num);
    getch();}
    void listarentre()
    { int min,max;
    system("CLS");
    printf("Qual a numero minimo:");
    scanf("%d",&min);
    printf("Qual a numero maximo:");
    scanf("%d",&max);
    printf("NUMEROS ENTRE %d E %d:",min,max);
    for(i=1;i<=n;i++)
    if((num>min)&&(num<max))
    printf("\nNumero: %d",num);
    getch(); }
    void lsm()
    {int media,soma=0;
    system("cls");
    for(i=1;i<=n;i++)
    soma+=num;
    media=soma/n;
    printf("\n\nNumeros Superiores a media\n\n");
    for(i=1;i<=n;i++)
    { if(num>media)
    printf("%d\n",num); }
    getch(); }
    void acrescent()
    {int a;
    system("CLS");
    printf("Quantos quer acrescentar?");
    scanf("%d",&a);
    for(i=n+1;i<=n+a;i++)
    {printf("\nnum[%d]=",i);
    scanf("%d",&num); }
    n+=a; }
    void eleminar()
    {int e;
    system("cls");
    listar();
    printf("que elemento quer tirar?\n");
    scanf("%d",&e);
    for(i=e;i<n;i++)
    num=num[i+1];
    n--;
    printf("elemento eleminado\n");
    getch(); }
    void ondequeracrescent()
    {int p;
    system("cls");
    printf("Em que posicao quer inserir\n");
    scanf("%d",&p);
    for(i=n;i>=p;i--)
    num[i+1]=num;
    printf("Valor a acrescentar?\n");
    scanf("%d",&num[p]);
    n++; }
    void maiorquemedia()
    {int soma=0,media;
    for(i=1;i<=n;i++)
    soma+=num[i];
    media=soma/n;
    system("CLS");
    printf("MAIORES QUE A MEDIA:\n");
    for(i=1;i<=n;i++)
    if(num[i]>media)
    printf("%d",num[i]);
    printf("\n");
    getch(); }
    void paim()
    { system("CLS");
    printf("NUMEROS PARES:");
    for(i=1;i<=n;i++)
    if(num[i]%2==0)
    printf("\nnum[%d]=%d",i,num[i]);
    printf("\nNUMEROS IMPARES:");
    for(i=1;i<=n;i++)
    if(num[i]%2!=0)
    printf("\nnum[%d]=%d",i,num[i]);
    getch(); }
    void inver()
    {system("CLS");
    for (i=n;i>=1;i--)
    printf("num[%d]\n",num[i]);
    getch(); }
    int main()
    { char opc;
    do
    { system("CLS");
    printf("\nMENU\n");
    printf("\n1 - Ler ");
    printf("\n2 - Listar ");
    printf("\n3 - Listar entre 2 numeros ");
    printf("\n4 - Listar maiores que a media ");
    printf("\n5 - Inserir novo ");
    printf("\n6 - Eliminar");
    printf("\n7 - Acrescentar Em Qualquer Posicao");
    printf("\n8 - Listar os pares e os impares");
    printf("\n9 - Listar os numros por ordem inversa");
    printf("\n");
    printf("\n0 - Sair ");
    opc=getch();
    switch(opc)
    {case '1':{ler();break; }
    case '2':{listar();break; }
    case '3':{listarentre();break; }
    case '4':{lsm();break; }
    case '5':{acrescent();break; }
    case '6':{eleminar();break; }
    case '7':{ondequeracrescent();break;}
    case '8':{paim();break; }
    case'9' :{inver();break; }

    }}
    while(opc!='0'); }[/i][/i][/i][/i][/i][/i][/i][/i]
     
  3. Unread #2 - Mar 24, 2014 at 2:38 PM
  4. kmjt
    Joined:
    Aug 21, 2009
    Posts:
    14,450
    Referrals:
    8
    Sythe Gold:
    449

    kmjt -.- The nocturnal life chose me -.-
    Banned

    6 months

    Probably would expect to learn more concepts in 6 months than that (from what I can tell from the paste).
     
  5. Unread #3 - Mar 24, 2014 at 2:59 PM
  6. Manipultor
    Joined:
    Mar 16, 2014
    Posts:
    178
    Referrals:
    0
    Sythe Gold:
    0

    Manipultor Active Member
    Banned

    6 months

    yeah i know..we have programming 7 hours a week with 30+ persons in the classes, the rest we math,english, computers architecture, Telecommunications network,Information and communications technology and others.but i wish we had more time for programming.
     
  7. Unread #4 - Mar 24, 2014 at 3:05 PM
  8. kmjt
    Joined:
    Aug 21, 2009
    Posts:
    14,450
    Referrals:
    8
    Sythe Gold:
    449

    kmjt -.- The nocturnal life chose me -.-
    Banned

    6 months


    I kind of assumed it was college/university. Are you in high school?
     
  9. Unread #5 - Mar 24, 2014 at 3:26 PM
  10. Manipultor
    Joined:
    Mar 16, 2014
    Posts:
    178
    Referrals:
    0
    Sythe Gold:
    0

    Manipultor Active Member
    Banned

    6 months

    I'm on high school, i decided science (at the last year of high school) was not for me and i started over again.

    This will be 3 years and i got another year which is for specialisation which allow me to enter university automatically without any entrance exams.
     
  11. Unread #6 - Mar 25, 2014 at 12:00 AM
  12. Nick 91
    Joined:
    Apr 29, 2013
    Posts:
    873
    Referrals:
    0
    Sythe Gold:
    0

    Nick 91 full stack web developer + nikola.katic.91 skype
    Banned

    6 months

    I would say it's fair considering it's high school.
     
  13. Unread #7 - Mar 25, 2014 at 1:38 AM
  14. kmjt
    Joined:
    Aug 21, 2009
    Posts:
    14,450
    Referrals:
    8
    Sythe Gold:
    449

    kmjt -.- The nocturnal life chose me -.-
    Banned

    6 months

    Yeah if it is high school it is definitely a good head start.
     
< [Python]Calling multiple instance of a script in CMD/Creating a GUI | LF Person to do my Minecraft Server Permissions.yml! paying 07 >

Users viewing this thread
1 guest


 
 
Adblock breaks this site