>n; cout<>b; cout<>br; : Notes">

NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

#include<iostream>
using namespace std;
class cvijece
{
string n,b;
int br,c;
public:
void upis()
{
cout<<"Naziv: ";
cin>>n;
cout<<endl<<"Boja: ";
cin>>b;
cout<<endl<<"Broj: ";
cin>>br;
cout<<endl<<"Cijena:";
cin>>c;
}
void ispis()
{
cout<<endl<<n<<'t'<<b<<'t'<<br<<'t'<<c;
}
};
int main()
{
int n;
cin>>n;
cvijece c[6];
for(int i=0;i<n;i++)
{
c[i].upis();
}
for(int i=0;i<n;i++)
{
c[i].ispis();
}
return 0;
}
----------------------------
#include <iostream>
using namespace std;
class cvijet{
public:
int sifra;
string ime;
string boja;
int kom;
int cijena;
UPIS(){

cout<<"sifra je: ";
cin>>sifra;
cout<<"cvijet: ";
cin>>ime;
cout<<"boja cvijeta je: ";
cin>>boja;
cout<<"broj komada: ";
cin>>kom;
cout<<"cijena komada: ";
cin>>cijena;
}
ISPIS()
{
cout<<"sifra je: "<<sifra<<endl;
cout<<"cvijet: "<<ime<<endl;
cout<<"boja cvijeta je: "<<boja<<endl;
cout<<"broj komada: "<<kom<<endl;
cout<<"cijena komada: "<<cijena<<endl;
}
};
int main(){

cvijet flower[5];
int n;
cin>>n;
for(int i=0; i<n; i++){
flower[i].UPIS();
}
for(int i=0; i<n; i++){
flower[i].ISPIS();
}
}
-----------------------------------
#include <iostream>;
using namespace std;

class razlomak
{ public:
int brojnik;
int nazivnik;
};
int main()
{razlomak raz;
cout<<"nUnesi brojnik ";
cin>>raz.brojnik;
cout<<"nUnesi nazivnik ";
cin>>raz.nazivnik;
cout<<"nRazlomak ";
cout<<raz.brojnik<<'/'<<raz.nazivnik;
return 0;
}
----------------------------------------------
#include <iostream>
using namespace std;

class razlomak
{
protected:
int brojnik;
int nazivnik;

public:

void ZAMJENA(int b, int n)
{
int brojnik=b;
int nazivnik=n;}

void ISPIS(int brojnik, int nazivnik)
{

cout<<"nRazlomak ";
cout<<brojnik<<'/'<<nazivnik;
}

};
int main()
{razlomak raz;
int b,n;
cout<<"nUnesi brojnik ";
cin>>b;
cout<<"nUnesi nazivnik ";
cin>>n;
raz.ZAMJENA(b,n);
raz.ISPIS(b,n);
return 0;
}
---------------------------------------
#include<iostream>

using namespace std;

class Pravokutnik
{
public:
int Povrsina (int a,int b)
{
return (a * b);
}
};
class Trokut
{
public:

int Povrsina (int a,int b)
{
return (a * b / 2);
}
};
int main () {

Pravokutnik pr;
Trokut tr;
//int a,b;
//cin>>a>>b;
cout << pr.Povrsina(10,5) << endl << tr.Povrsina(10,5) << endl;
return 0;
}
------------------
#include <iostream>;
using namespace std;

class razlomak
{
private:
int brojnik;
int nazivnik;
public:
int UNOSB()
{cout<<"nUnesi brojnik ";
cin>>brojnik;
return brojnik;}
int UNOSN()
{

cout<<"nUnesi nazivnik ";
cin>>nazivnik;
return nazivnik;}
};

int main()
{razlomak raz;
int b,n;
b=raz.UNOSB();n=raz.UNOSN();
cout<<"nRazlomak ";
cout<<b<<'/'<<n;
return 0;
}


     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.