We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Asesor 2
#include <stdio.h> #include <conio.h>
struct datos { int codigo; int cantidad; float precio; };
struct datos Regi[10];
main() { int i; int nelems = 10; float importe = 0.0;
printf("< Solicitud de ingreso de del seguro : %d >\n", nelems);
for(i = 0; i < nelems; i++) { printf("\nnro. elemento: %d\n", i+1); printf("ingrese código: "); scanf("%d", &Regi[i].codigo);
printf("ingrese meses a contratar: "); scanf("%d", &Regi[i].cantidad); printf("ingrese precio: "); scanf("%f", &Regi[i].precio);
}
puts("\n< Resultados >\n");
printf("Código"); for(i = 0; i < nelems; i++) { printf(" %d", Regi[i].codigo); }
printf("\nCantidad"); for(i = 0; i < nelems; i++) { printf(" %d", Regi[i].cantidad); }
printf("\nPrecio"); for(i = 0; i < nelems; i++) { printf(" %.2f", Regi[i].precio); }
printf("\nImporte"); for(i = 0; i < nelems; i++) { printf(" %.2f", (Regi[i].cantidad * Regi[i].precio)); }
getch(); return 0;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Asesor 2
#include <stdio.h>
#include <conio.h>
struct datos
{
int codigo;
int cantidad;
float precio;
};
struct datos Regi[10];
main()
{
int i;
int nelems = 10;
float importe = 0.0;
printf("< Solicitud de ingreso de del seguro : %d >\n", nelems);
for(i = 0; i < nelems; i++)
{
printf("\nnro. elemento: %d\n", i+1);
printf("ingrese código: ");
scanf("%d", &Regi[i].codigo);
}
puts("\n< Resultados >\n");
printf("Código");
for(i = 0; i < nelems; i++)
{
printf(" %d", Regi[i].codigo);
}
printf("\nCantidad");
for(i = 0; i < nelems; i++)
{
printf(" %d", Regi[i].cantidad);
}
printf("\nPrecio");
for(i = 0; i < nelems; i++)
{
printf(" %.2f", Regi[i].precio);
}
printf("\nImporte");
for(i = 0; i < nelems; i++)
{
printf(" %.2f", (Regi[i].cantidad * Regi[i].precio));
}
getch();
return 0;
The text was updated successfully, but these errors were encountered: