how can write all 1to 100 prime numbers using for loop,if and
break ?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / divyanshu
#include<iostream.h>
#incude<conio.h>
int main()
{
int x=100,i,p=1;
cout<<"enter the no.";
cin>>x;
for(i=2;i<x;i++)
{
if(x%i==0)
{
p=2;
break;
}
if(x==1)
{
cout<<"prime no.";
}
getch();
}
| Is This Answer Correct ? | 2 Yes | 12 No |
find the sum of two matrices and WAP for it.
write a program that will open the file, count the number of occurences of each word in the the complete works of shakespeare. You will then tabulate this information in another file.
What is scope rule in c?
Explain what is the difference between functions getch() and getche()?
can we define a function in structure?
which is an algorithm for sorting in a growing Lexicographic order
Where is volatile variable stored?
Who invented bcpl language?
What is the use of linkage in c language?
Is javascript written in c?
print pattern 1 1 33 33 555 555 77777777 555 555 33 33 1 1
write a program to convert a expression in polish notation (postfix) to inline (normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix