Pratian technologies Company Programming Program

state the output of the following code:

longnum=11010;
long d=0;
long rem=0;
long p=1;
while(num!=0){
rem=num%10;
d=d+rem*p;
p=p*2;
num/=10;
}
System.out.println(d);


Read Solution (Total 18)

Pratian technologies Other Question

state the output of the following code:

intnum=8;
inti=1;
int s=-1;
while(i<=num)
System.out.println((i++*s=-s)) +" ");
state the output of the following code:
intnum=80;
inti=1;
intmul=1;
while(i<=num){
System.out.println(i+" ");
i+=4*mul++;
if(mul%3==0)
++mul;
}