i need to alone print a number no text by using if statement
.say some idea



i need to alone print a number no text by using if statement .say some idea ..

Answer / Tanuj Trivedi

In most programming languages, you can print a number without text using an if statement like this:nnExample in Python:nnum = 10nif num > 0:n print(num)nExample in C:nint num = 10;nif (num > 0) {n printf("%d", num);n}nExample in Java:nint num = 10;nif (num > 0) {n System.out.println(num);n}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Engineering AllOther Interview Questions

Explain what is meant by repetition of information and inability to represent information. Explain why each of these properties may indicate a bad relational database design.

2 Answers  


what is the basic need for tech..test?

1 Answers  


HI frds,,,am final yr IT student.. i secured 81% in x 55% in xii 87% in Btech upto last sem (no standing arrears..) i dt kw clearly abt MNC eligibility criteria.. i heard tat TCS hired 1y abv 60% 1y..so pls help me.. wic cmpnys r anouncd 55% may eligibl in 2011??? pls rly me clearly and sugst som of d compny names...

1 Answers  


what is software engineer

1 Answers   Cognizant, NIIT,


WHAT THE DIFFERENCE BETWEEN JCB 3DX & 3D?

7 Answers   HCC, L&T,


explain in detail about life cycle of thread

1 Answers  


safety valve calculation?

1 Answers   HEG,


How will a tester be sure that He’s covered the entire functionality in his Test case and not missed out anything?

1 Answers  


A code which had some declarations of some data items. There were a couple of normal data items(char,int..) and some pointers as well and a malloc call. You have to find the total memory taken up in the stack(Hint:Pointers and all are allocated in heap, not in stack, so dont count them).Also in most of these questions, they were specifying that the OS was 32 bit

1 Answers   Syntel,


A company canteen needs an automated system for its food and beverage management. The canteen receives food and beverage items from different distributors. All the non perishable items are stored in the store-room and the perishable items are put in the fridge. The manager should be able to add, delete or update food and beverage items onto the system and perishable and non perishable item details are to be stored separately. Both waiters and the cooks should be able to update the perishable items, but only the cooks should be allowed to update the non perishable items. Both cooks and waiters are not allowed to add or delete any items that are entered. identify the Schema, Table , Fields

1 Answers   Accenture,


i m doing engg in IT .for getting job which courses i have to do?

1 Answers   HCL,


Why should we use white box testing

0 Answers  


Categories
  • Civil Engineering Interview Questions Civil Engineering (5086)
  • Mechanical Engineering Interview Questions Mechanical Engineering (4453)
  • Electrical Engineering Interview Questions Electrical Engineering (16638)
  • Electronics Communications Interview Questions Electronics Communications (3918)
  • Chemical Engineering Interview Questions Chemical Engineering (1095)
  • Aeronautical Engineering Interview Questions Aeronautical Engineering (239)
  • Bio Engineering Interview Questions Bio Engineering (96)
  • Metallurgy Interview Questions Metallurgy (361)
  • Industrial Engineering Interview Questions Industrial Engineering (259)
  • Instrumentation Interview Questions Instrumentation (3014)
  • Automobile Engineering Interview Questions Automobile Engineering (332)
  • Mechatronics Engineering Interview Questions Mechatronics Engineering (97)
  • Marine Engineering Interview Questions Marine Engineering (124)
  • Power Plant Engineering Interview Questions Power Plant Engineering (172)
  • Textile Engineering Interview Questions Textile Engineering (575)
  • Production Engineering Interview Questions Production Engineering (25)
  • Satellite Systems Engineering Interview Questions Satellite Systems Engineering (106)
  • Engineering AllOther Interview Questions Engineering AllOther (1379)