answersLogoWhite

0


Best Answer

Prime numbers are numbers that are only divisible by themselves and the number 1. You can write a program to print all prime numbers from 1 to 100 in FoxPro.

User Avatar

Wiki User

โˆ™ 2014-06-09 22:32:17
This answer is:
๐Ÿ™
0
๐Ÿคจ
0
๐Ÿ˜ฎ
0
User Avatar
Study guides
๐Ÿ““
See all Study Guides
โœ๏ธ
Create a Study Guide

Add your answer:

Earn +20 pts
Q: Program for print prime all number from 1 to 100 in foxpro?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How many pages are required to print large prime number?

An infinite number of pages are required to print an infinitely large prime number.


How do you find prime no in gwbasic program?

10 input "enter a no."; n 20 for i = 1 to n 30 if n mod i = 0 then c = c +1 40 next i 50 if c = 2 then print "prime number" else print "not a prime number" 60 end


Write a program to find odd or even number with string?

CLS PRINT "PROGRAM: Find if number is odd/or, even" PRINT INPUT "Enter number: ", number$ number% = VAL(number$) PRINT PRINT "The number is "; IF number% MOD 2 = 0 THEN PRINT "even." ELSE PRINT "odd." END IF END


How can you Write a suitable pseudo code to check whether a number is prime or not?

Begin Read num for(i=2; i<num; i++) if(num%2==0) then print "the number is not a prime no."; else if print "the number is prime"; end if Stop


What BASIC program can compute and display all prime numbers from 1 to 40?

PRINT 2,3,5,7,11,13,17,19,23,29,31,37


WAP To print the squares of all even numbers from 1 to 20?

CLS PRINT "PROGRAM: Print squares of all even numbers from 1 to 20" PRINT PRINT "number", "squared" PRINT FOR number% = 1 TO 20 IF number% MOD 2 = 0 THEN PRINT number%, number% * number% END IF NEXT END


Write a java program to print if a number is prime or not?

int n=<desired number>; int i=2; // using 2 because every no is divisible by 1 boolean prime=false; loop : while(i<n){ if(n%i==0){ prime = true; break loop; } i++; } System.out.println(prime); // prints true if no is prime, false if it's not


C program code to print first 10 prime number?

puts ("2 3 5 7 11 13 17 19 23 29");


How to print prime numbers in C language program?

It is type-dependent: for 'int': printf ("%d", prime); for 'long': printf ("%ld", prime); for 'long long': printf ("%lld", prime);


C plus plus program to print number patterns?

bghjg


How do you write a program in Java to input a number and print whether it is prime or not?

import java.util.*; class Prime { public static void main(String s[]) { int a,c=0; Scanner sc=new Scanner(System.in); System.out.println("enter a number"); a=sc.nextInt(); for(int i=1;i<=a;i++) if(a%i==0) c++; if(c==2) System.out.println("prime number"); else System.out.println("not a prime number"); } }


Write a program to find prime number in vb net?

Private Sub Command1_Click() Dim I, N As Integer N = Val(Text1.Text) For I = 2 To N - 1 If N Mod I = 0 Then Print "THE NUMBER IS NOT A PRIME NUMBER" Exit Sub End If Next I Print "THE NUMBER IS A PRIME NUMBER" End Sub Private Sub Command2_Click() Text1.Text = "" Text1.SetFocus End Sub Private Sub Command3_Click() End End Sub


How do you print a file in foxpro?

You can try the below FoxPro code: Report Form "C:\Project\Reports\PrintReport" Preview Report Form "C:\Project\Reports\PrintReport" To Printer Prompt Nodialog Preview


What is a C program to print the number of an array in reverse order?

What is the number of an array<question mark>


Write a program to find sum of 10 numbers?

CLS PRINT "PROGRAM: Add up 10 numbers entered from the keyboard;" PRINT " then, printout their sum total." PRINT sumTotal = 0 FOR eachNo% = 1 TO 10 IF eachNo% < 10 THEN PRINT " "; PRINT eachNo%; "> "; INPUT "Enter number: ", number sumTotal = sumTotal + number NEXT PRINT PRINT "The sum total of your 10 numbers is: "; sumTotal END


How do you write the prime number program in java?

/* Program to print prime numbers up to given number */ import java.util.*; public class Prime { public static void main(String args[]) { Scanner sc=new Scanner(System.in); System.out.println("Enter the number : (it prints prime numbers upto your given number)"); int n=sc.nextInt(); System.out.println("The Prime number upto "+n+" are : "); while (n>=0) { int count=0; for (int i=1;i<=n ;i++) { if (n%i==0) { count++; } } if (count==2) { System.out.print(n+" "); } n--; } } }


Write a c plus plus program to check whether a no is prime or not?

#include<iostream.h> #include<conio.h> int main() { clrscr(); cout<<"PROGRAM TO CHECK IF THE NUMBER IS PRIME OR NOT:"<<endl; cout<<"Enter a number:"; int n; cin>>n; for(int i=2;i<n;i++) { if(n%i==0) { cout<<"THE NUMBER IS NOT PRIME"<<endl; } } if(i==n) { cout<<"THE NUMBER IS PRIME"<<endl; } else { exit(1); } getch(); return 0; } Note: the exit(1) statment needs protype and on not prime numbers it execute the full loop and print the result like this enter the number n=6 the number is not prime the number is not prime the number is prime instead of it try this code with a little modification . i aknowledge your work. #include<iostream.h> #include<conio.h> void main() { clrscr(); cout<<"PROGRAM TO CHECK IF THE NUMBER IS PRIME OR NOT:"<<endl; cout<<"Enter a number:"; int n; cin>>n; for(int i=2;i<n;i++) { if(n%i==0) { cout<<"THE NUMBER IS NOT PRIME"<<endl; goto g1; } } if(i==n) { cout<<"THE NUMBER IS PRIME"<<endl; } g1: getch(); }


How do you write a program to accept a number and print it's digit in words?

Write a program enters the ten-digit number and prints Using the largest for


How do you write a program to twin print prime numbers from 1 to 50 in PHP?

I suggest you write an outer loop, that loops through all the numbers from 1 to 50. Call the variable that controls the loop something like "number".Then, initially assume the number is a prime (with a variable such as "isprime"); and write another loop that compares whether the number is divisible by any number from 2 to number-1. Call the controlling variable "factor". If number is divisible by factor, then it is not a prime, and you can exit the loop. At the end of the inner loop, if the variable "isprime" is still true, then you print the number.


Write a program to print prime numbers from 1 to n?

#includ<iostream.h> int main () { int n,n-1; for(n=0); cout<<"the number is even:"<<endl; if(n=n-1) cout<<"the number is prime:"<<endl; getch 0; return 0; }


Write a program in Java to print the numbers 1 to 100?

You can do this easily in a "for" loop. The relevant part of the program looks like this: for (number = 1; number <= 100; number++){ System.out.println(number); }


Write a c program to print all prime numbers from 1 to n by using for loop?

Yes, please do write.


How do you solve this program wap to print sum of a digit of an inputed number?

wap to print all the arnstrong no. between 100&1000


Write a program to print largest of three numbers?

num1% = 0 num2% = 0 num3% = 0 highestNum% = 0 CLS PRINT "PROGRAM: Find the highest number" PRINT INPUT "Enter the first number: ", num1% highestNum% = num1% INPUT "Enter the second number: ", num2% IF num2% > highestNum% THEN highestNum% = num2% INPUT "Enter the third number: ", num3% IF num3% > highestNum% THEN highestNum% = num3% PRINT PRINT "The largest number you entered was: "; highestNum% END


Write a java script program to print first ten odd natural numbers in C?

Q.1 Write a program to print first ten odd natural numbers. Q.2 Write a program to input a number. Print their table. Q.3 Write a function to print a factorial value.