Answer The Following: Theory Questions
Answer The Following: Theory Questions
SCHOOL - NUNGAMBAKKAM
INFORMATICS PRACTICES – Practice Paper
Class XI
Answer the following:
Theory questions:
JAVA WITH NETBEANS
int i; sum= 0;
i=1 ;
while (i<=5)
{
sum =sum +i
i+=3
} System.out.println(sum) ;
b. How many times the loop gets executed and write the output.
int x=0;
do{
System.out.print(“Welcome to MYSQL”);
}while(x!=0);
13. Rewrite the following code using while loop :
a. int i,j;
for(i=1,j=2;i<=6;i++,j+=2)
System.out.println(i++);
System.out.println(“Finished!!!”);