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...

how can write all 1to 100 prime numbers using for loop,if and
break ?

Answer Posted / sandeep

#include<stdio.h>
main()
{
int a=2;

work:
printf("%d",a);
a=a+2;
check:
if(a<=100)
goto work;

}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how can you restore a redirected standard stream?

1050


What is the right type to use for boolean values in c?

998


What does a pointer variable always consist of?

1056


What is main () in c language?

1089


Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]

1038


What is a null string in c?

998


What is wrong with this declaration?

1054


What is a function in c?

1504


What is the difference between arrays and pointers?

1077


write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.

5415


What is conio h in c?

1011


What is modeling?

1007


What is the importance of c in your views?

1117


Explain the difference between #include "..." And #include <...> In c?

995


Differentiate between full, complete & perfect binary trees.

1060