Front-end Software Engineer Interview Report
- -1of 1 vote
AnswersThe below Java program prints the numbers from 1 to 50. But for multiples of three print "DNA" instead of the number and for the multiples of five print "RNA". For numbers which are multiples of both three and five print "ATGC". Please identify the three bugs in the code and suggest how they can be resolved.
- sunilkanaujia.manit December 20, 2013 in India
public class SeqTest {
public static void main(String args[]) {
for(int i = 1; i <= 50; i++) {
if(i % 3 == 0) System.out.println("DNA");
else if(i % 5 == 0) System.out.println("RNA");
else if(i % (3+5) == 0) System.out.println("ATGC");
else System.out.println(“1 to 50”);
}
}
}| Report Duplicate | Flag | PURGE
Front-end Software Engineer - 0of 0 votes
AnswersFor a table created using the following commands. State the SQL SELECT command to find the 1st and 2nd highest salary earned by staff working in DEL or MUM
- sunilkanaujia.manit December 20, 2013 in India
CREATE TABLE Employees (
ID int NOT NULL AUTO_INCREMENT,
Name varchar(100),
Sal decimal (10,2),
City char (3),
PRIMARY KEY (ID)
);
INSERT INTO Employees (Name, Sal, City) VALUES ('Ramesh',20000, 'BLR');
INSERT INTO Employees (Name, Sal, City) VALUES ('Sunil',24000, 'DEL');
INSERT INTO Employees (Name, Sal, City) VALUES ('Sreeja',21000, 'MUM');
INSERT INTO Employees (Name, Sal, City) VALUES ('Pavan',23000, 'DEL');
INSERT INTO Employees (Name, Sal, City) VALUES ('Maya',24000, 'MUM');| Report Duplicate | Flag | PURGE
Front-end Software Engineer