#include <iostream>
using namespace std;

int main() {
    int  temperatura;
    int sottoZero =0;

    do {
    cout <<"Inserisci una temperatura (-999 per terminare): ";
    cin >>temperatura;

       if (temperatura < 0&& temperatura!= -999)
            sottoZero++;
    }while (temperatura !=-999);
   cout << "Temperature  sotto lo zero: " << sottoZero << endl;

    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: