using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace bt_77
{
class Program
{
static void Main(string[] args)
{
int n, s = 0;
string t = "";
do
{
Console.Write("nhap n="); n = int.Parse(Console.ReadLine());
t = t + n+"\t";
if (n > 0)
{
s = s + n;
}
}
while (n != 0);
Console.WriteLine("tong la:" + s);
Console.WriteLine("cac so da nhap la:"+t);
Console.ReadKey();
}
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace bt_77
{
class Program
{
static void Main(string[] args)
{
int n, s = 0;
string t = "";
do
{
Console.Write("nhap n="); n = int.Parse(Console.ReadLine());
t = t + n+"\t";
if (n > 0)
{
s = s + n;
}
}
while (n != 0);
Console.WriteLine("tong la:" + s);
Console.WriteLine("cac so da nhap la:"+t);
Console.ReadKey();
}
}
}