Jump to content

erro ou malukisse?


Gurzi
 Share

Recommended Posts

#include <stdio.h>
#include <stdlib.h>

main()
{
  int salario[13];
  int i;
  int total;

  for (i=1; i<13;i++)
   {
     printf("Qual o salario no mes %d\n",i);
     scanf("%d",salario[i]);
     total+=salario[i];
   }
   printf(" MES        Valor");
   for (i=1; i<13;i++)
   {
     printf("%d         %d",i,salario[i]);

   }
   putchar('\n');
   printf("Total Anual : %d    ",total);
   system("PAUSE");
}
Link to comment
Share on other sites

o [ i ] esta bem, eu é que me esqueci de o escrever.

eu pessoalmente acho que para se escrever se deve escrever sempre printf pk o putchar é uma variante do printf que provavelmente mais cedo ou mais tarde vai desaparecer pk tu podes meter apenas um char tb no printf...mas se preferes o putchar tb esta bem.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.