Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace HW
- {
- class Program
- {
- static void Main(string[] args)
- {
- int num;
- int k = 0;
- int multply = 0;
- num = Convert.ToInt32(Console.ReadLine());
- for (int i = 0; i <= num; i ++)
- {
- multply = i * i;
- k += multply;
- }
- Console.WriteLine(k);
- Console.ReadLine();
- }
- }
- }
Add Comment
Please, Sign In to add comment