Post Reply  Post Thread 
djeljenje u c
Author Message
skyy
Novi korisnik
*


Posts: 35
Group: Registered
Joined: Mar 2006
Status: Offline
Reputation: 0
Post: #1
djeljenje u c

kako da podjelim u c a da mi prikaze cjeli rezultat nap podjelim 14 sa 4 da mi pokaze 3.50

28-05-2007 07:12 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Morrison
Forumaš
***


Posts: 564
Group: Registered
Joined: Mar 2007
Status: Offline
Reputation: 10
Post: #2
RE: djeljenje u c

pa valjda moraš odrediti tip varijable? (decimal,integer..etv..)
nisam upoznat sa c jezikom al u svakom je isti princip.

28-05-2007 07:26 PM
Find all posts by this user Quote this message in a reply
schmrz
_
*


Posts: 206
Group: Team
Joined: Feb 2007
Status: Offline
Reputation: 8
Post: #3
RE: djeljenje u c

Code:
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{

  float sOcjene,bPredmeta;
  sOcjene = 47;
  bPredmeta = 12;

  //Izracunaj prosjek ocjena
  printf("Prosjek: %3.2f" ,sOcjene/bPredmeta);
  //Koristimo modifikator uz f
  //Broj 3 oznacava cjelokupnu duzinu broja, a 2 oznacava broj decimalnih mjesta
  
  getchar();
  return 0;
}


Za vise informacija koristite google... He he

28-05-2007 08:25 PM
Find all posts by this user Quote this message in a reply
programer1994
Novi korisnik
*


Posts: 2
Group: Registered
Joined: May 2008
Status: Offline
Reputation: 0
Post: #4
RE: djeljenje u c

el radiš baš u c ili c++,ja sam bolji u c++ i qbasicu

11-05-2008 04:20 PM
Find all posts by this user Quote this message in a reply
Gogy
____
*


Posts: 1,729
Group: Webmaster
Joined: Feb 2006
Status: Offline
Post: #5
RE: djeljenje u c

Datum prvog posta: 28.05.2007

Ne misliš li da je to možda u skoro godinu dana već riješio? Ne diži tako stare teme.


Pravila foruma

eBooks Network - download besplatnih e-knjiga
11-05-2008 07:58 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Morrison
Forumaš
***


Posts: 564
Group: Registered
Joined: Mar 2007
Status: Offline
Reputation: 10
Post: #6
RE: djeljenje u c

programer je malo zabrijao He he

12-05-2008 01:49 PM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: