Sign in to follow this  
Cornel Iulian

[C] Suma primelor K numere impare, [K>0] [Limbaj C]

1 post in this topic

Cerinta: Sa se calculeze suma primelor k numere impare, unde k este un intreg pozitiv ce se preia de la consola.

#include <stdio.h>
#include <stdlib.h>

int main ()
	int k,sum,i;
	printf("Sa se calculeze suma primelor k numere impare.\n\n");
	printf("Introduceti un numar intreg, pozitiv pentru k: ");
		printf("Date eronate!!");
	printf("Suma: %d",sum);
	return 0;


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this