+ 1
Why error?
You are organizing a party for 7 guests. They all love beer. Write a program that receives the number of bottles you bought as input and calculates how many bottles are left after all guests have received an equal number of bottles. Sample input thirty Result example 2
2 ответов
+ 6
They are 7 guests not 8.
We have to use '%' operator to get the reminder
+ 2
Attempt:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Code_Coach_Challenge
{
class Program
{
static void Main(string[] args)
{
int kol = Convert.ToInt32(Console.ReadLine());
int res = kol /= 8;
Console.WriteLine(res);
}
}
}