#include stdio.hvoid solve() {int a[] = {1, 2, 3, 4, 5};int sum = 0;for(int i = 0; i 5; i++) {if(i % 2 == 0) {sum += *(a + i);}else {sum -= *(a + i);}}printf("%d", sum);}int main() {solve();return 0;}
#include iostreamusing namespace std;int main() {for(int row=0;row3;row=row+1){for(int col=0;col3;col=col+1){cout"*";}cout endl;}}
class Sookshmas{static int k=10;static class Sookshmas1{void m1(){System.out.println(k);}static void m3(){System.out.println("java");}}}class Test{public static void main(String[] args){Sookshmas.Sookshmas1 ab=new Sookshmas.Sookshmas1();ab.m1();Sookshmas.Sookshmas1.m3();}}