www.vustudents.ning.com

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.

# Solved

i solved my assignment

Views: 2812

Attachments:

### Replies to This Discussion

Use Next line code i.e

"\n"

someone plz tell me what is wrong in this code?

#include <iostream.h>
main ()
{
int Limit, Values, Sum = 0, Average = 0, Min = 0, Max = 0, MinIndex = 1, MaxIndex = 1;
cout "Enter the Loop Limit:";
cin >> Limit;
for (int i = 1; i <= Limit; i++) // for loop
{
if (i == 1)
{cout "Enter the 1st Value:";
}
else if (i == 2)
{
cout "Enter the 2nd Value:";
}
else if (i == 3)
{
cout "Enter the 3rd Value:";
}
else if (i <= Limit)
{
cout"Enter" i "th Value:";
}
cin >> Values; //taking values from user
Sum += Values;
Average = Sum / Limit;
if (i == 1)
{
Min = Values;
Max = Values;
MinIndex = i;
MaxIndex = i;
}
if (Min > Values)
{
Min = Values;
MinIndex = i;
}
if (Max < Values)
{
Max = Values;
MaxIndex = i;
}
}

1

2

3

4

5

## VIP Member Badge & Others

How to Get This Badge at Your Profile DP

------------------------------------

Management: Admins ::: Moderators

Other Awards Badges List

## Latest Activity

Fatima replied to Fatima's discussion eco403 assignment solution 2 in the group ECO403 Macroeconomics
23 minutes ago
vu student updated their profile
24 minutes ago

### Jannah ? Hold you deen tight.

55 minutes ago
2 hours ago
3 hours ago
Muhammad Bilal replied to BBA(6th smes)'s discussion assignment 1 spring 2021 in the group MGT402 Cost & Management Accounting
4 hours ago
★---★ ⱮԱϚҠȺហ ȺచȺហ ★---★ updated their profile
4 hours ago
Mani Siddiqui posted a discussion

### Create your Final term datasheet

5 hours ago

© 2021   Created by + M.Tariq Malik.   Powered by