Skip to content

Instantly share code, notes, and snippets.

@zhuharev
Created September 29, 2016 11:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zhuharev/e9c3178c82f0d59fcb65d2bc4663b3c5 to your computer and use it in GitHub Desktop.
Save zhuharev/e9c3178c82f0d59fcb65d2bc4663b3c5 to your computer and use it in GitHub Desktop.
main.cs
using System;
namespace ConsoleApplication1
{
class ConsoleApplication1
{
public static void Main (string[] args)
{
int sum = 0;
for (int i=0; i<10; i++) {
Console.Write("Введите число {0}:", i+1);
sum = sum + int.Parse(Console.ReadLine());
}
Console.WriteLine("Сумма: {0}", sum);
Console.ReadKey();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment