Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main ()
- {
- int a[10];
- int b;
- int d;
- for (int i=0; i<10; i++)
- {
- a[i]=0;
- }
- while (1)
- {
- cout << "vvedite nomer carti,vid 0 do 9: ";
- cin >> b;
- if (b>-1 & b<10)
- {
- cout << "vvedite sumy ";
- cin >> d;
- a[b]=a[b]+d;
- for (int i=0; i<10; i++)
- {
- cout << a[i] << " ";
- }
- cout << endl;
- }
- else
- cout << "ne virno vvedenii nomer" << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement