Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  projc++
Language: C/C++
Code:
#include <iostream>
#include<cstring>
using namespace std;

class llogaria{
    private:
         int balanca;
         
    public:
        llogaria(int b)  ;                           
        
    {if (b>=0)
    {balanca=b;}
    
    else{balanca=0;
         cout<<"Gabim";}
         
}
void krediti(int vlera);
{balanca=balanca+vlera;}     

void debiti(int vlera);
    if(balanca>=vlera)

    {balanca=balanca-vlera};    
    
    else{ cout<<"Tejkalohet balanca";}
}
int getbalanca(){                               
    return balanca;
}
}

int main() {
    llogaria ll(1000);                  

    ll.kediti(400);                    
    ll.debiti(600);                      
    cout<<ll.getbalane();     
}




          
          
Comments: