Computer Science, asked by Anonymous, 8 months ago

Predict the output: int a=6,b; b= a++ + ++a; System.out.println(b);

Answers

Answered by priyomrabhadas
3

Answer:

public static void sumUp(int n, int total){

int i;

for (i=1; i<=n; i++){

total = total +i;

}

}

public static void main(String args[]){

int n, total;

n=10; //n can be initialized to any +ve number

total=0;

sumUp(n, total);

System.out.println(total);

Explanation:

Answered by js9999472
0

Answer:

h hjwns

nsnsns

Explanation:

jdjdj jdne kdb

Similar questions