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

What are the procedures followed for underground cable laying.....???

2 Answers   KSEB,


why mostly conductor made by 7 nos wire?

1 Answers  


What happen if 200KVAR capacitor continuesly connected to load and all the plant machinaries are not in working?

4 Answers  


What is the formula to calculate the rating of a three phase air circuit breaker

0 Answers  


why capacitor bank shorted by resistance ( 3 terminal )

1 Answers  






why we are caling 440 volt 3 phase supply instead of 660 volt 3 phase supply? because each phase as a voltage of 220 volt. if anybody know the answer for my question please send it to my mail id. thank you.

3 Answers   College School Exams Tests, Jindal Steel and Power, JIOL, NEC,


Why neutral cable carry current.

0 Answers   Tech Mahindra,


what is the write prosidure of stringing of 8meter pcc pole.

0 Answers  


In industries Power factor is maintained by installing a suitable KVAR bank, How is the PF maintained for domestic use, where is the capacitor bank connected

3 Answers  


Why transformer, generator, ups rating kva?

2 Answers  


What is the effect if power factor is above 1 or unity.

15 Answers   NTS,


What is mean by CT Saturate? how do we calculate?

5 Answers   ABC,


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)