Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* prac06
- Ciclos For. Basado en Ejercicio 19 */
- #include <radc++.h>
- Form frmForma("Ciclos For",86,100,324,426,RCP_SIMPLE);
- Label lblInfo("Este programa muestra una lista de numeros indicando cuales son multiplo de 3",AUTO_ID,14,14,271,25,frmForma);
- TableView tableNum("",AUTO_ID,7,49,159,277,frmForma);
- Button cmdStart("Comenzar",AUTO_ID,175,63,100,25,frmForma);
- FormProcedure frmForma_Procedure(FormProcArgs) {
- ON_CLOSE() {
- /* [X] Code when form is closed . */
- Application.close(); //remove this line if it is not main form of application
- }
- ON_COMMAND_BY(cmdStart) {
- /* Code when button is clicked. */
- int i;
- int j=0;
- tableNum.addColumn("Num");
- tableNum.addColumn("Multiplo 3");
- for (i=1; i<=15; i++)
- {
- tableNum.addRow();
- // frmForma.caption = str(i);
- tableNum.addCell(0,j,str(i));
- if (i % 3 == 0)
- tableNum.addCell(1,j,"Si");
- else
- tableNum.addCell(1,j,"No");
- j++;
- }
- }
- return 0;
- }
- rad_main()
- frmForma.procedure=frmForma_Procedure;
- rad_end()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement