wap to print prime number from 1 to 100 using c++



wap to print prime number from 1 to 100 using c++..

Answer / digvijay ghildiyal

#include<iostream.h>
#include<conio.h>
void main()
{
int x,c,i;
clrscr();
cout<<"\n";
for(i=1;i<=100;i++)
{c=0;
for(x=1;x<=i;x++)
{
if(i%x==0)
c++;
}
if(c==2)
cout<<"\n"<<i;
}
getch();
}

Is This Answer Correct ?    16 Yes 10 No

Post New Answer

More Electrical Engineering Interview Questions

Why annealing is done on transformer core manufacturing process?

1 Answers   ISRO,


What is the definition of ohms law?

7 Answers   AZ Engineering, Ecil,


Why the Motor takes High Current in Starting time?

5 Answers  


I have 4 DG set with 1500KVA rating. system breakers are 11KV & alternator are 415 Volts. Between alternator & breaker one stepup transformer used. i want to Know what is max. resistance for body earthing & 415 & 11KV V Neuteal earthing. my fault current is 14 times for 2 sec.

0 Answers   Jindal,


How can I calculate the trnaformer effciency at different loading condition?

2 Answers  






hey guys i recently saw a long transmission line in which a sort of balloons in red and white color were hanging at each section.do u have any idea why are they kept for?

3 Answers  


what is the difference between MCCB and SFU in terms of their application?

2 Answers   Secure Meters, Tata Teleservices,


how to calculate the knee point voltage of current transformer?

2 Answers  


redundant connection in contactor?

0 Answers   Emerson,


what is harmonics?

1 Answers   powercom,


What are the basic & Majour problems in UPS ?

0 Answers   Roto Power, RotoPower,


75kw drive operated motor current fluctuation from(85-130)ampere.current setting in drive is 130amp.sometimes motor trip when current limit cross 130amps.I change the drive. still current fluctuate between 80-130amps but in this time motor not trip,current setting in drive is 130amps.where is the problem?

1 Answers  


Categories
  • Civil Engineering Interview Questions Civil Engineering (5085)
  • Mechanical Engineering Interview Questions Mechanical Engineering (4451)
  • Electrical Engineering Interview Questions Electrical Engineering (16632)
  • 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)