Ad

Not sure if this is what you are looking for..

Finding Prime Numbers Flow Chart ..or this.. What is the flowchart for five prime numbers Google Search

Posted on Dec 13, 2016

Ad

Hi there,

Save hours of searching online or wasting money on unnecessary repairs by talking to a 6YA Expert who can help you resolve this issue over the phone in a minute or two.

Best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.

Here's a link to this great service

Good luck!

Posted on Jan 02, 2017

Ad

Draw a flowchart to accept two numbers and any one of the following characters: +, -, *, or /. Based on the character entered,

Nov 25, 2013 | Cagiva Raptor 1000 Motorcycles

input a number and check whether the number is positive or negative?

Jun 28, 2012 | Global Marketing Partners FLOWCHARTS AND...

create a flowchart determine whether an inputted value is negative or positive

Jul 09, 2011 | Global Marketing Partners FLOWCHARTS AND...

create a flowchart that will increase the value of the number by 5 if it is greater than 10 and display the result. otherwise multiply the value by 5 and display the result.

Jun 23, 2011 | Audio Players & Recorders

Draw a flowchart to display all the odd numbers between 0 and 500

Dec 09, 2010 | Computers & Internet

create a flowchart that will print the sum of all even numbers from 1 to 100

Jul 09, 2010 | Activision Video Game Consoles & Games

Try this site, I think it gives you the best answer:

http://www.scribd.com/doc/10396888/Flowchart-of-Fibonacci-Number-Display-and-Summation

http://www.scribd.com/doc/10396888/Flowchart-of-Fibonacci-Number-Display-and-Summation

Feb 14, 2010 | Global Marketing Partners FLOWCHARTS AND...

Try the Following Five Programs

1) Program for Prime Number Generation

#include <stdio.h>

main()

{

int n,i=1,j,c;

clrscr();

printf("Enter Number Of Terms

");

printf("Prime Numbers Are Follwing

");

scanf("%d",&n);

while(i<=n)

{

c=0;

for(j=1;j<=i;j++)

{

if(i%j==0)

c++;

}

if(c==2)

printf("%d ",i)

i++;

}

getch();

}

--------------------------------------------------------------------------------------------------------------------------------------------------

2)Program for finding the prime numbers

#include <stdio.h>

#include <conio.h>

void main()

{

int n,m,k,i,max;

char c;

clrscr();

repeat: max=0;

k=2;

n=1;

printf("You want prime numbers upto:- ");

scanf("%d",&max);

printf("

");

for (i=1;i<=max;i++)

{

again: m=(n/k)*k;

if (m!=n)

k=k+1;

else

goto try1;

if (k < n/2)

goto again;

else

printf("%d",n);

printf(" ");

try1: n=n+1;

k=2;

}

fflush(stdin);

printf ("

Do you want to continue?(y/n):- ");

scanf("%c",&c);

if (c=='y')

goto repeat;

getch();

}

---------------------------------------------------------------------------------------------------------------------------------------------------

3)

4)

#include<stdio.h>

#include<conio.h>

void main()

{

int n,i,c=0;

clrscr();

printf("enter the number:");

scanf("%d",&n);

for(i=1;i<=n;i++)

{

if(n%i==0)

{

c=c+1;

}

}

if(c==2)

printf("number is prime");

else

printf("number is not prime");

getch();

}

-------------------------------------------------------------------------

5)

#include<stdio.h>

#include<conio.h>

void main()

{

int a,b,c;

clrscr();

printf("enter the number:");

scanf("%d",&a);

for(b=2;b<a/2;b++)

{

if(n%i==0)

{

printf("\n Its not a Prime number");

c=1;

break;

}

if(flag==0)

printf("\n Its a Prime Number");

getch();

}

}

1) Program for Prime Number Generation

#include <stdio.h>

main()

{

int n,i=1,j,c;

clrscr();

printf("Enter Number Of Terms

");

printf("Prime Numbers Are Follwing

");

scanf("%d",&n);

while(i<=n)

{

c=0;

for(j=1;j<=i;j++)

{

if(i%j==0)

c++;

}

if(c==2)

printf("%d ",i)

i++;

}

getch();

}

--------------------------------------------------------------------------------------------------------------------------------------------------

2)Program for finding the prime numbers

#include <stdio.h>

#include <conio.h>

void main()

{

int n,m,k,i,max;

char c;

clrscr();

repeat: max=0;

k=2;

n=1;

printf("You want prime numbers upto:- ");

scanf("%d",&max);

printf("

");

for (i=1;i<=max;i++)

{

again: m=(n/k)*k;

if (m!=n)

k=k+1;

else

goto try1;

if (k < n/2)

goto again;

else

printf("%d",n);

printf(" ");

try1: n=n+1;

k=2;

}

fflush(stdin);

printf ("

Do you want to continue?(y/n):- ");

scanf("%c",&c);

if (c=='y')

goto repeat;

getch();

}

---------------------------------------------------------------------------------------------------------------------------------------------------

3)

- #include <stdio.h>
- int main(void) {
- int n,
- lcv,
- flag; /* flag initially is 1 and becomes 0 if we determine that n
- is not a prime */
- printf("Enter value of N > ");
- scanf("%d", &n);
- for (lcv=2, flag=1; lcv <= (n / 2); lcv++) {
- if ((n % lcv) == 0) {
- if (flag)
- printf("The non-trivial factors of %d are: \n", n);
- flag = 0;
- printf("\t%d\n", lcv);
- }
- }
- if (flag)
- printf("%d is prime\n", n);
- }

4)

#include<stdio.h>

#include<conio.h>

void main()

{

int n,i,c=0;

clrscr();

printf("enter the number:");

scanf("%d",&n);

for(i=1;i<=n;i++)

{

if(n%i==0)

{

c=c+1;

}

}

if(c==2)

printf("number is prime");

else

printf("number is not prime");

getch();

}

-------------------------------------------------------------------------

5)

#include<stdio.h>

#include<conio.h>

void main()

{

int a,b,c;

clrscr();

printf("enter the number:");

scanf("%d",&a);

for(b=2;b<a/2;b++)

{

if(n%i==0)

{

printf("\n Its not a Prime number");

c=1;

break;

}

if(flag==0)

printf("\n Its a Prime Number");

getch();

}

}

Sep 02, 2008 | Computers & Internet

Input FirstNumber

Input SecondNumber

Sum= FirstNumber + SecondNumber

If FirstNumber > SecondNumber

Diff=FirstNumber-SecondNumber

Else

Diff=SecondNumber - FirstNumber

END IF

Product = FirstNumber * SecondNumber

Input SecondNumber

Sum= FirstNumber + SecondNumber

If FirstNumber > SecondNumber

Diff=FirstNumber-SecondNumber

Else

Diff=SecondNumber - FirstNumber

END IF

Product = FirstNumber * SecondNumber

Jul 07, 2008 | Computers & Internet

52 people viewed this question

Usually answered in minutes!

×