LAB6_P1

	//WAP in C to print sum of 12+23+34………
#include<stdio.h>
#include<math.h>
void main()
{
	int sum,i,num;
	printf("\n Enter How Many Numbers to Print : ");
	scanf("%d", &num);
	for(i=1; i<=num; ++i)
	{
	sum = sum + pow(i,i+1);
	printf("\n sum = %d", sum);
	}
}
Posted in Uncategorized
Write a comment