imports microsoft.visualbasic
dim cowid (cherd) as integer
dim cowyield(cherd) as double
dim lessmilk(cherd) as integer
Console.WriteLine("type the number of cows in your herd..:")
cherd = console.readline()
console.writeline("type the cow ID..:")
cowid(a)=console.readline()
while cowid(a)<100 or cowid(a)>999
console.writeline("wrong id, please type correct cow id...:")
cowid(a)=console.readline()
console.writeline("duplicate cow id, please type correct cow id..:")
cowid(a)=console.readline()
console.writeline("milk yield for the day" &d)
console.writeline("milk yield details of Cow ID"&cowid(a))
console.writeline("type the milk yield (litres) for session 1:")
console.writeline("type the milk yield (litres) for session 2:")
lessmilk(a)=lessmilk(a)+1
tmilk=math.round(tmilk+cowyield(a),0)
herdavg=math.round(tmilk/cherd,1)
console.writeline("total weekly volume of milk:"&tmilk)
console.writeline("average weekly volume of milk" &herdavg)
console.writeline("cow ID:"& cowed(a)"total yield:"&cowyield(a) "average yield per week:" &round(cowyield(a)/7,1))
dim maxcid, mincid as integer
console.writeline("cow ID:" &maxcid& "has produced most milk" &max)
console.writeline("cow ID:"&mincid& "has produced least milk"&min)
console.writeline("cow ID:"&cowid(a)& "has produced less than 12 litres of milk for "&lessmilk(a)& "days in a week"")