Jak użyć modulo Visual C++ 2005?

Jak użyć modulo w visualu abym mogl otrzymac reszte z dzielenia przez jaks liczbe?

Jaka biblioteke trzeba jeszcze dopisac?

#include "cmath"

?

Czy inna?

:slight_smile:

nie nie musisz dodawać, np taki program

#include "stdafx.h"


using namespace System;


int main(array ^args)

{

    int a=7;

    int b=4;

    int c=a%b;

    Console::WriteLine(c.ToString());

    return 0;

}

wyświetla poprawnie reszte z dzielenia

W C++ modulo to znak “%”(procenta).

Aha rzeczywiscie działa myslalem ze w visualu to jest “MOD” czy cos takiego :smiley:

Ale ze mnie dureń :mrgreen:

Dzięki!