So i got an exam now, and i am not ready for it, so im counting on you guys!
N people came to conference. Transporting them from hotel to conference a number of cars is given, their capacity(not including driver) is K or M people. Cars at hotel go this way, first car with capacity K(people),after that comes car with capacity M, then again K, and M and so on.. Each car can transport only so much people as given in exercise.We need to make programme, about how much cars are needed to transport all people.
P.S sorry for english translation, exercise is in latvian.
User inserts 3 natural numbers N, K and M values. Its known, that 0<N<2147483648, 0<K<100, 0<M<100.
Im really counting on your help guys, thanks for your time.
1 2 3 4 5 6 7 8 9 10 11 12

#include <iostream.h>
#include <stdio.h>
#include <conio.h>
void main()
{
int x,N,K,M;
cout<<"Ievadi cik cilveki ieradas uz konferenci: "; cin>>N;
cout<<"Ievadi cik cilveki var iekapt pirmajaa auto: "; cin>>K;
cout<<"Ievadi cik cilveki var iekapt otrajaa auto:"; cin>>M;
if(0<N<2147483648,0<K<100,0<M<100)
{
x=(N/K) && (N/M);
 
got so far :/