МаКсиМгАбОв М МаКсиМгАбОв Регистрация 26 Июн 2013 Сообщения 81 Репутация -4 Спасибо 0 Монет 0 4 Май 2016 #1 Нужно переделать этот код чтоб он работал в Windows Form #include "stdafx.h" #include "iostream" #include "iomanip" using namespace std; int main() { const int n=4,m=4; float c,a[n][m]; srand(time(0)); cout<<"C: "; cin>>c; for(int i=0;i< n;i++) for(int j=0;j< m;j++)a[j]=(rand()%201-100)/10.; for(int i=0;i< n;i++) { for(int j=0;j< m;j++)cout<<setw(8)<<a[j]; cout<<endl; } cout<<endl; for(int j=0;j< m;j++) for(int i=0;i< n;i++)a[j]=a[j]>0?c:0; for(int i=0;i< n;i++) { for(int j=0;j< m;j++)cout<<setw(8)<<a[j]; cout<<endl; } cout<<endl; cout<<"Press Enter for exit "; cin.get(); cin.get(); } А Windows Form выглядел примерно так как на фото //otvet.imgsmail.ru/download/19339623_1c6e092f62831b1849d3cc8d6a42c912_800.jpg
Нужно переделать этот код чтоб он работал в Windows Form #include "stdafx.h" #include "iostream" #include "iomanip" using namespace std; int main() { const int n=4,m=4; float c,a[n][m]; srand(time(0)); cout<<"C: "; cin>>c; for(int i=0;i< n;i++) for(int j=0;j< m;j++)a[j]=(rand()%201-100)/10.; for(int i=0;i< n;i++) { for(int j=0;j< m;j++)cout<<setw(8)<<a[j]; cout<<endl; } cout<<endl; for(int j=0;j< m;j++) for(int i=0;i< n;i++)a[j]=a[j]>0?c:0; for(int i=0;i< n;i++) { for(int j=0;j< m;j++)cout<<setw(8)<<a[j]; cout<<endl; } cout<<endl; cout<<"Press Enter for exit "; cin.get(); cin.get(); } А Windows Form выглядел примерно так как на фото //otvet.imgsmail.ru/download/19339623_1c6e092f62831b1849d3cc8d6a42c912_800.jpg
еккеу Е еккеу Регистрация 26 Июл 2013 Сообщения 99 Репутация 0 Спасибо 0 Монет 0 4 Май 2016 #2 Что-то не припомню чтобы у С++ были WindowsForms) Позитивный голос 0
Tinkle T Tinkle Регистрация 18 Мар 2013 Сообщения 65 Репутация 1 Спасибо 0 Монет 0 4 Май 2016 #3 Задание на 15 минут. Считываешь в массив значение боксов по очереди, потом суммируешь по ряду. Позитивный голос 0