Playground
#include <iostream> using namespace std; int main() { //ispechati gi broevite od 1 do 10 for (int i=1; i<=10; i++) cout << i << endl; //presmetaj zbir na broevite od 1 do 1000 //koi se delivi so 2 ili 5 int s = 0; for (int i=1; i<=1000; i++) { if ((i%2 == 0) || (i%5 == 0)) s += i; } cout << "Zbirot e: " << s << endl; //sledniot del kje otpechati ('0 10', '2 7', '4 4') for (int i=0, j=10; i<=j; i+=2, j-=3) { cout << i << " " << j << endl; } //site 3 parametri (inicijalizacija, uslov i promeni) //se nezadolzitelni int ii=0, kk=10; for ( ;ii<kk; ) { cout << ii << endl; //mora da go azurirame 'ii' ii++; } return 0; }
Input data
Program output
no input
Execute
Language: ????????? | Memory: ???? KB | Time: ??? ms
Nothing has been executed, yet!