related on the first question...which is getting the commission,,,
let me correct it..if you run this code the sample output will be like below;
the problem is I dont know which one will be first to make a code.

the output will be like this;
sample output
monthly sale=15250
commission=610

next output ;
monthly sale=-5
commission=invalid output

last output;
monthly sale=45280
commision=170

the problem is I dont know which one will be first to make a code.

i don't understand what you want to say

the output will be like this;
sample output
monthly sale=15250
commission=610

next output ;
monthly sale=-5
commission=invalid output

last output;
monthly sale=45280
commision=170

where is the code you've written to produce such output ?
But as a hint , i can recommend you to use of loop.

loop will help to produce the result more times(Looping allows to repeat statements).you need not write the code for 3 times , just put it inside loop body and put such condition which ensures that loop will run 3 times(i mean that condition must be true till 3 iteration).

for more information on loop , see my tutorial on loop , here

If you want us to helpful, please post your code.

Closed. Continued here

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.