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

What is 'bus error'?

743


Explain the bubble sort algorithm.

759


What are the usage of pointer in c?

797


What is difference between structure and union?

706


By using C language input a date into it and if it is right?

683






In C language what is a 'dangling pointer'?

720


The file stdio.h, what does it contain?

773


Define macros.

889


Program to find the sum of digits of a given number until the sum becomes a single digit. (e.g. 12345=>1+2+3+4+5=15=>1+5=6)

795


What is the difference between text and binary modes?

751


How can I find the modification date of a file?

801


What is calloc malloc realloc in c?

688


How do shell structures work?

671


What is a shell structure examples?

688


Which function in C can be used to append a string to another string?

744