Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is prime #12

Closed
wants to merge 1 commit into from
Closed

is prime #12

wants to merge 1 commit into from

Conversation

lucasMarioza
Copy link

#4 Completed

@tiagokapp
Copy link

#include<stdio.h>

main()
{

int n, cont, primo, s,seq;
printf("digite quantos numeros primos vc deseja");
scanf("%d",&n);
s=0;
seq=0;
while (cont<=n)
{
	printf("digite a sequencia de numeros primos");
	scanf("%d",&seq);
	
	cont=cont+1;

	if (seq%1==seq && seq%seq==0)
	{
		seq=seq+1;
	
	s=s+seq;
	}

		    
    

}

	printf("o valor dos numeros primos eh %d\n\n\n",seq);
	printf("%d\n\n\n", s);

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants