Sou iniciante em C, Fiz esse Programinha usando meu conhecimento, alguma dica ?
usei Vetor, Função, Repetições, Condições e etc.
#include<stdio.h>
#include<stdlib.h>
#include<locale.h>
#include<string.h>
#include<conio.h>
char xxx(){
printf("------CRÉDITOS------\n\nCRIADO POR: Hudson Maciel Miranda\n");
}
int xyz(int xx, int yy, int zz){
int z[5];
z[1]=1;
printf("\n\n--------------------------------\n\n");
printf("Digite o Numero de Repetições: ");
scanf("%d", &z[2]);
while(z[1]<=z[2]){
printf("\nDigite um numero:");
scanf("%d", &z[3]);
printf ("\nDigite um numero:");
scanf ("%d", &z[4]);
z[5] = z[3] / z[4];
printf("\n\n-------------");
printf("\n| RESULTADO |");
printf("\n-------------");
printf("\n %d / %d = %d \n",z[3],z[4],z[5]);
printf("\n\n--------------------------------\n\n");
z[1]=z[1]+1;
printf(" Fim !\n");
printf("\n--------------------------------\n");
system("pause");
system("cls");
}
system("pause");
return z[5];
}
int main() {
system("color 0A");
setlocale(LC_ALL, "Portuguese");
int x[7];
char zyx[50], yxz[50];
x[1] = 0;
printf("Nome e Sobrenome: ");
scanf("%s%s", &zyx, &yxz);
system("cls");
printf("1 para Tabuada: \n\n2 para numeros inteiros: \n\n3 para créditos: \n\nDigite: ");
scanf("%d", &x[2]);
system("cls");
if (x[2]==1){
system ("date /t");
system ("time /t");
printf(" %s %s", zyx, yxz);
printf("\n\n-------------TABUADA-------------\n\n");
printf("Digite o numero de repetições: ");
scanf("%d", &x[3]);
{if (x[3] > 0)
while (x[1]<x[3]) {
printf("\n\nDigite o Numero Inicial: ");
scanf("%d", &x[4]);
printf("\n\nDigite o Numero Limite: ");
scanf("%d", &x[5]);
printf("\n\nDigite o Numero: ");
scanf("%d", &x[6]);
printf("\n\n----------TABUADA DE %d-----------\n\n", x[6]);
printf("-------------");
printf("\n| RESULTADO |");
printf("\n-------------");
{if (x[6] > 0 && x[5] > x[4])
for (x[7] = x[4];x[7] <= x[5];++x[7]) {
printf("\n %d x %d = %d", x[6], x[7], x[6]*x[7]);
}
else
printf("\n\nO numero deve ser Positivo ou o numero limite deve ser maior que o inicial !\n");
}
x[1] = x[1] + 1;
printf("\n\n--------------------------------\n\n");
{
if (x[3]==1)
printf(" Fim !\n");
}
{
if (x[3]>1)
printf(" Fim !\n");
printf("\n--------------------------------\n\n");
}
}
else
printf("\nO Numero de repetições deve ser positivo !");
}
}
system("pause");
if (x[2]==2){
system ("date /t");
system ("time /t");
printf(" %s %s", zyx, yxz);
printf("\n\n-----DIVISÃO POR NUMEROS INTEIROS-----\n\n");
printf("%d", xyz(x[3], x[4], x[5]));
}
if (x[2]==3){
system ("date /t");
system ("time /t");
printf("%s", xxx());
}
return 0;
}