write a Program to dispaly upto 100 prime numbers(without
using Arrays,Pointer)
Answer Posted / jigar
#include<stdio.h>
#include<conio.h>
void main()
{
int a,n,f;
clrscr();
for(n=1;n<=100;n++)
{
f=0;
for(a=2;a<n;a++)
{
if(n%a==0)
{
f=1;
break;
}
}
if(f==0)
printf("%d",n);
}
getch();
}
// JIGAR SHOBHANA (ANIDA VACHHARA-GONDAL)
| Is This Answer Correct ? | 4 Yes | 7 No |
Post New Answer View All Answers
Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.
What do you mean by recursion in c?
hi folks i m approching for h1 b interview on monday 8th of august at montreal and i m having little problem in my approval notice abt my bithdate my employer has made a mistake while applying it is 12th january and istead of that he had done 18 the of january do any body have any solution for that if yes how can i prove my visa officer abt my real birthdate it urgent please let me know guys thaks dipesh patel
Are pointers really faster than arrays?
Give differences between - new and malloc() , delete and free() ?
Differentiate between a for loop and a while loop? What are it uses?
Explain what is the difference between a string and an array?
Is there a way to jump out of a function or functions?
What is void c?
What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file
How can I write functions that take a variable number of arguments?
1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321
What is signed and unsigned?
Why is c still so popular?
Study the following C program :call_me (myvar)int myvar;{ myvar +- 5; }main(){int myvar;myvar = 3;call_me(myvar);printf("%d ",myvar);What will be printed a) 3 b) 5 c) 8 d) symbol