Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Write a program to print prime nums from 1-20 using c
programing?

Answer Posted / bheem rao

#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,count=0;
for(i=2;i<=20;i++)
{
for(j=1;j<=i;i++)
{
if(i%j==0)
count++;
}
if(count==2)
printf("%d\n",i);
count=0;
}
}

Is This Answer Correct ?    12 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you determine the length of a string value that was stored in a variable?

1083


Which is better oop or procedural?

995


Why is it usually a bad idea to use gets()? Suggest a workaround.

1692


Explain is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?

1159


What is an identifier?

980


What is the scope of static variable in c?

947


hi to every one .. how to view table pool after creating the pooled table? plz help me.. if any knows abt this ..

1871


How a string is stored in c?

1019


in ‘C’ language for Matrix Multiplication fails” Introspect the causes for its failure and write down the possible reasons for its failure.

7993


What does sizeof return c?

1015


What is an operator?

1021


Hi how many types of software editions are there and their difference (like home editions, enterprise, standard etc) can u please help me

1900


which is an algorithm for sorting in a growing Lexicographic order

1749


Explain how can you check to see whether a symbol is defined?

1089


What is context in c?

887