WAP to print all prime nos between 1 to 100 without using user
input...pls reply within few hours...
Answer Posted / ashwek
/// Using C++
#include<iostream.h>
#include<conio.h>
int main(){
int temp;
cout<<" Prime number between 1 to 100 : ";
for(int i=2; i<=100; i++){
temp=0;
for(int j=2; j<i; j++){
if(i%j==0) temp = 1;
}
if(temp==0) cout<<i <<", ";
}
}
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
hii I inntrested abt scjp certification but i dont knw abt scjp plz send details abt scjp exam and syllabus.
smal talk is pure object oriented or not?
I have try to write a record in a TDQ from a fle.... what are the steps to do... can anybody plz come with a solution
1. Consider the following input and generate the object code using single pass assembler. JOHN START 0 USING *,15 L 1,FIVE A 1,FOUR ST 1,TEMP FOUR DC F’4’ FIVE DC F’5’ TEMP DS ‘F END
What ports must be open for DCOM over a firewall? What is the purpose of Port 135?
can any one suggestion me present which course(except java,.net) has huge demand in the market?
it is a language or tools?
what are other resources are needed for this mantis?
write the a cl program with the following specification A. Accept 2 parameters-date and date type B. if date type is J then convert date to *MDY format C. if date type is M convert date to *JUL format 4.send a program message with the value of converted date Please explain for each with coding?
Write a shell program where you enter a number which corresponds to K.M. Find out the corresponding values in m, cm, inches, and feet. Hints:- 1 k.m= 1000 m 1 m= 100 cm 1 inches= 2.54 cm. 1 feet= 12 inches
1.Mutating table
Difference between debugging, running, executing of an application
What is the difference beween joblib and steplib statements
I HAVE DONE TESTING TOOLS COURSE,NOW I AM FRESHER,I AM NOT GETTING ANY CALLS,I WANT TO DO THE PROJECT ,WHERE I HAVE TO MEET TO DO THE PROJECT,I AM GOING WITH FAKE EXPERIENCE,SO WHAT I HAVE TO DO.
5. Which of the following can you do with DB2 Express- C? Query databases with SQL Query databases with XML using XQuery and XPath Use SQL in Xquery and Xquery in SQL All of the above