WAP to print all prime nos between 1 to 100 without using user
input...pls reply within few hours...
Answer / 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 |
Is buffer size and file block size is similar? If similar,at which case it will be same size?
Create a class TicTacToe that will enable you to write a complete program to play the game of Tic-Tac-Toe. The class contains as private data a 3- by-3 double array of integers. The constructor should initialize the empty board to all zeros. Allow two human players. Wherever the first player moves, place a 1 in the specified square; place a 2 wherever the second player moves. Each move must be to an empty square. After each move determine whether the game has been won and whether the game is a draw. If you feel ambitious, modify your program so that the computer makes the moves for one of the players automatically. Also, allow the player to specify whether he or she wants to go first or second. If you feel exceptionally ambitious, develop a program that will play three-dimensional Tic-Tac-Toe on a 4-by-4-by-4
what is different betweet class and interface in java?
2 Answers Microsoft, Sun Microsystems,
What are events in smartforms?
Write a program to swap the content of two variables without using a third variable.
Given an array of size n. It contains numbers in the range 1 to n. Each number is present at least once except for 1 number. Find the missing number
hi friends i am ravi here , i have one problem at starting at the interview that is i have my 3+ it(java) years experiance profile so if i attend the interview interviewer ased me tel me about your profile so i not able to explain because i dont knw where to start and where to end and i dont know what i should tel and what i shouldnot tel .....so can any body please clear m doubts clearly.............please help me friends,i am awaiting for friends reply please.............
major characteristics of software system
what is the difference between "types" and "data" in abap.
what is the difference between SCAN AND CHECK,LOKUP AND XFOOT? where we can use thease opcodes? Can any body tell me real time senariao with example?
3.Give the formula for determine the range of the data type?
What is the difference between COM and CORBA?