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
What are the Short cut Keys of Tally ERP?
we create a pf with 3 fields.2 is defined as keyfields.we lock it with alcobj command.how we find out whether the file is locked or not?is it dspfd??/
Iam using Microsoft Visual Studio to create a system for mobile store I want to know how to calculate mobile price that the customer buy and how to reduce quantity from the data base that we have for mobile .And also how to calculate revnue for each mobile and revnue for the total mobile
why we use mantis? what u mean mantis in IT trends? addvantages of mantis?
HOW TO FIND NUMBER OF TWOS IN N!(N FACTORIAL)??
Describe the difference between Interface-oriented, Object-oriented and Aspect-oriented programming
i am exeprienced person what is selection process
where is available in this mantis toturials?
How to change the color of a cell or a row in a datagrid on mouse hover using javascript/.net
What is the difference beween joblib and steplib statements
what is delegate and how works delegate and event.
Hi can you please send me recent(present) interview questions and technical qyestions with answers for "BUSSIESS OBJECTS" and "DATA WAREHOUSE".pls its urgent for me my mail id is sekhar.cs82@gmail.com,manjuforgis@gmail.com. thanks in advance
what is adodb??y it is used for connection of V.B and access??what is ado?dao?
when will triggars the at new event in abap and web dybn pro?
What's the difference b/w Table & Templete in Smartform?