Math, asked by swaroopsunil3948, 1 year ago

During the physical education hour, pd sir mr. Sundar has decided to conduct some team games. He wants to split the students in the class into equal sized teams. In some cases, there may be some students who are left out from teams and he wanted to use the left out students to assist him in conducting the team games. For instance, if there are 50 students in the class and if the class has to be divided into 7 equal sized teams, 7 students will be there in each team and 1 student will be left out. Pd sir asks your help to automate this team splitting task. Can you please help him out?

Answers

Answered by piyushsingh81255
1

Input Format:

Input consists of 2 integers. The first integer corresponds to the number of students in the class and the second integer corresponds to the number of teams.

Output Format:

Refer sample input and output for formatting specifications.

Sample Input and Output:

[All text in bold corresponds to input and the rest corresponds to output]

Enter the number of students in the class

60

Enter the number of teams

8

The number of students in each team is 7 and the number of students left out is 4

now check out the attachment

mark as 1

Attachments:
Answered by Krisha1103
0

Answer:

#include<iostream>

using namespace std;

int main()

{

 int a,b;

 cin>>a>>b;

 cout<<"The number of friends in each team is "<<a/b<<" and left out is "<<a%b<<endl;

 return 0;

}

Step-by-step explanation:

Similar questions