STUDENTS 3K

  • Home
  • Students+
    • Engineering Students
    • Education Loan
    • Study Abroad Guide
    • Projects Download
  • Freshers
    • Aptitude Q & A
    • Placement Papers
    • Verbal Ability
    • Interview Questions
    • IT Company Details
    • Job Updates
  • Study Resources
    • Career Guidance
    • LAB Programs
      • C Programs
      • CPP Programs [C++]
      • Java Programs
    • Question Papers
    • Learn English
    • Notice Board
  • More –>>
    • Love calculator
You are here: Home / Important Programs / C program to find the sum of squares of N natural numbers

C program to find the sum of squares of N natural numbers

This C program will let you know about “find the sum of squares of N natural numbers?”. This C source code is coming under the part of C beginners guide. Feel free to use this code or if you can just contribute as a program writer.

  • C program for finding the Cube values of a Number
  • How to get month name from month number – C program

SUM OF SQUARES OF N NUMBERS

Sum of squares of “n” numbers in c is used to find the square value of a number by using looping statement (for loop). It finds the power value of a given number and adds like wise. It is an easy and efficient way.

[Read: Software Company Details] & [Love % Calculator]

WRITE A C PROGRAM:

/* Title: Squares Value
Author: Vinoth Selvaraj
© http://students3k.com
*/
//Header files
#include<stdio.h>
#include<conio.h>
#include<math.h>

void main()
{
	//Program variables
	int j,num,su=0;

	clrscr(); //Function to clear the previous output
	printf("Enter the value:"); //Display function
	scanf("%d",&num); //Getting input function
	for(j=1;j<=num;j++) //Looping statement
	{
		su+=pow(j,2);
	}
	printf("Sum of square = %d",su);
	getch();
}

Filed Under: Important Programs Tagged With: C, LAB, Programs





Random Materials :

  • Data Mining and Data Warehousing
  • Difference Between Class and Primitive Types
  • Database Roles in SQL
  • CASE Expression in SQL
  • Concurrent Update Problem

Follow Us on Facebook

Advertisement

Company Profile

  • About Students3k
  • Contact Us
  • Earn Money Online
  • Website Archive Page
  • Privacy Policy
  • Disclaimer

Categories

  • Important Programs
  • Study Abroad
  • IT Companies
  • Career Guidance for Students
  • Teachers
  • Verbal Analogies

We Are Social

  • Facebook Fans
  • Twitter Follow
  • Google Plus
  • Pinterest Page

© Copyright 2012 - 2016 Students3k.com · All Rights Reserved · Designed By Benefits

Show