Advertisement
Diego1764

Programa Factura

Jan 30th, 2022
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.71 KB | None | 0 0
  1. #include<iostream>
  2. #include<conio.h>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7.  
  8.     float VectorA[4][5];
  9.     float sumames;
  10.     cout << endl;
  11.  
  12.     for (int i = 0; i < 4; i++)
  13.     {
  14.         cout << "***----Registro de la semana " << i + 1 << "----***" << endl;
  15.  
  16.         for (int j = 0; j < 7; j++)
  17.         {
  18.             cout << "Ingrese el valor total del dia " << j + 1 << " de la semana " << i + 1 << " :" << endl;
  19.  
  20.             cin >> VectorA[i][j];
  21.         }
  22.     }
  23.  
  24.     for (int i = 0; i < 4; i++)
  25.     {
  26.         float suma = 0;
  27.  
  28.         for (int j = 0; j < 7; j++)
  29.         {
  30.             suma = suma + VectorA[i][j];
  31.         }
  32.         cout << "La suma de la semana" << i + 1 << "es: " << suma << endl;
  33.         sumames = sumames + suma;
  34.     }
  35.  
  36.     cout << "El valor mensual es: " << sumames;
  37.  
  38.     getch();
  39.     return 0;
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement