begin process at 2012 05 27 20:51:59
  Trouver un code source :
 
dans
 
Accueil > 

Code

 > 

.Net

 > TAUX D'INTERETS

TAUX D'INTERETS


 Information sur la source

Note :
8 / 10 - par 1 personne
8,00 / 10

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 10
Catégorie :.Net Niveau :Débutant Date de création :03/06/2002 Date de mise à jour :03/06/2002 23:21:22 Vu :3 425

Auteur : JosueClement

Ecrire un message privé
Commentaire sur cette source (2)
Ajouter un commentaire et/ou une note

 Description

Calcul d'une somme finale d'après une somme un taux et un certain temps donné et vis versa...

Source

  • // Insertion des librairies
  • #include <iostream.h>
  • #include <stdio.h>
  • #include <stdlib.h>
  • #include <string.h>
  • #include <conio.h>
  • #include <math.h>
  • #include <windows.h>
  • //Prototypes de fonctions
  • void menu();
  • void interets();
  • void info();
  • void interetsc1();
  • void interetsc2();
  • //Fonction principale
  • void main()
  • {
  • menu();
  • }
  • void menu()
  • {
  • int choix;
  • system("cls");
  • printf("\n\nMenu:\n\n\n");
  • printf("\t1) Calcul des interets\n");
  • printf("\t2) Info\n");
  • printf("\t3) Quitter");
  • printf("\n\n\tFaites votre choix: ");
  • for (int err = 0 ; err != 1 ;)
  • {
  • choix = getch();
  • if(choix > 48 && choix < 52)
  • err++;
  • }
  • switch(choix)
  • {
  • case 49:
  • interets();
  • break;
  • case 50:
  • info();
  • break;
  • case 51:
  • system("cls");
  • exit(1);
  • break;
  • }
  • }
  • void info()
  • {
  • int choix;
  • system("cls");
  • printf("Esc - Retour au menu\n");
  • printf("\n\n\n\n");
  • printf("\tJosue Clement\n");
  • printf("\tjosue-clement@bluewin.ch\n");
  • printf("\thttp://www.3wphp.fr.st");
  • for (;;)
  • {
  • choix = getch();
  • if(choix == 27)
  • menu();
  • }
  • }
  • void interets()
  • {
  • int choix;
  • system("cls");
  • printf("\n\nCalcul des interets:\n\n\n");
  • printf("\t1) Depuis une somme de base\n");
  • printf("\t2) Depuis une somme avec interets\n");
  • printf("\t3) Retour au menu");
  • printf("\n\n\tFaites votre choix: ");
  • for (int err = 0 ; err != 1 ;)
  • {
  • choix = getch();
  • if(choix > 48 && choix < 52)
  • err++;
  • }
  • switch(choix)
  • {
  • case 49:
  • interetsc1();
  • break;
  • case 50:
  • interetsc2();
  • break;
  • case 51:
  • system("cls");
  • menu();
  • break;
  • }
  • }
  • void interetsc1()
  • {
  • int choix;
  • double somme , interets , temps , somme_interets;
  • system("cls");
  • printf("\n\nDepuis une somme de base:\n\n\n");
  • printf("\tSomme de depart: ");
  • cin >>somme;
  • printf("\n\tTaux d'interets (en %%): ");
  • cin >>interets;
  • printf("\n\tTemps en jours: ");
  • cin >>temps;
  • somme_interets = somme + ((somme * interets * temps)/(36000));
  • system("cls");
  • printf("Esc - Retour au menu\n");
  • printf("\n\n\n");
  • printf("Somme finale: %10.2f",somme_interets);
  • for (;;)
  • {
  • choix = getch();
  • if(choix == 27)
  • menu();
  • }
  • }
  • void interetsc2()
  • {
  • int choix;
  • double somme , interets , temps , somme_interets;
  • system("cls");
  • printf("\n\nDepuis une somme avec interets:\n\n\n");
  • printf("\tSomme totale avec interets: ");
  • cin >>somme_interets;
  • printf("\n\tTaux d'interets (en %%): ");
  • cin >>interets;
  • printf("\n\tTemps en jours: ");
  • cin >>temps;
  • somme = (somme_interets * 36000)/((interets * temps) + 36000);
  • system("cls");
  • printf("Esc - Retour au menu\n");
  • printf("\n\n\n");
  • printf("Somme de depart: %10.2f",somme);
  • for (;;)
  • {
  • choix = getch();
  • if(choix == 27)
  • menu();
  • }
  • }
// Insertion des librairies

#include <iostream.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <conio.h>
#include <math.h>
#include <windows.h>


//Prototypes de fonctions

void menu();
void interets();
void info();
void interetsc1();
void interetsc2();

//Fonction principale

void main()
{

menu();

}


void menu()
{
	int choix;
	
	system("cls");
	printf("\n\nMenu:\n\n\n");
	printf("\t1) Calcul des interets\n");
	printf("\t2) Info\n");
	printf("\t3) Quitter");
	printf("\n\n\tFaites votre choix: ");

	for (int err = 0 ; err != 1 ;)
	{
		choix = getch();
		if(choix > 48 && choix < 52)
			err++;
	}

	switch(choix)
	{
	case 49:
		interets();
		break;

	case 50:
		info();
		break;

	case 51:
		system("cls");
		exit(1);
		break;
	}
	
}


void info()
{
	int choix;
	
	system("cls");
	printf("Esc - Retour au menu\n");
	printf("\n\n\n\n");
	printf("\tJosue Clement\n");
	printf("\tjosue-clement@bluewin.ch\n");
	printf("\thttp://www.3wphp.fr.st");
	for (;;)
	{
		choix = getch();
		if(choix == 27)
			menu();
	}	
}

void interets()
{
	int choix;

	system("cls");
	printf("\n\nCalcul des interets:\n\n\n");
	printf("\t1) Depuis une somme de base\n");
	printf("\t2) Depuis une somme avec interets\n");
	printf("\t3) Retour au menu");
	printf("\n\n\tFaites votre choix: ");

	for (int err = 0 ; err != 1 ;)
	{
		choix = getch();
		if(choix > 48 && choix < 52)
			err++;
	}

	switch(choix)
	{
	case 49:
		interetsc1();
		break;

	case 50:
		interetsc2();
		break;

	case 51:
		system("cls");
		menu();
		break;
	}
}

void interetsc1()
{
	int choix;
	double somme , interets , temps , somme_interets;

	system("cls");
	printf("\n\nDepuis une somme de base:\n\n\n");

	printf("\tSomme de depart: ");
	cin >>somme;
	
	printf("\n\tTaux d'interets (en %%): ");
	cin >>interets;

	printf("\n\tTemps en jours: ");
	cin >>temps;

	somme_interets = somme + ((somme * interets * temps)/(36000));

	system("cls");
	printf("Esc - Retour au menu\n");
	printf("\n\n\n");

	printf("Somme finale: %10.2f",somme_interets);

	for (;;)
	{
		choix = getch();
		if(choix == 27)
			menu();
	}	
}

void interetsc2()
{
	int choix;
	double somme , interets , temps , somme_interets;

	system("cls");
	printf("\n\nDepuis une somme avec interets:\n\n\n");

	printf("\tSomme totale avec interets: ");
	cin >>somme_interets;
	
	printf("\n\tTaux d'interets (en %%): ");
	cin >>interets;

	printf("\n\tTemps en jours: ");
	cin >>temps;

	somme = (somme_interets * 36000)/((interets * temps) + 36000);

	system("cls");
	printf("Esc - Retour au menu\n");
	printf("\n\n\n");

	printf("Somme de depart: %10.2f",somme);

	for (;;)
	{
		choix = getch();
		if(choix == 27)
			menu();
	}
}

 Conclusion

Le programme a été testé et comilé avec Ms Visual Studio 6.0
Si vous trouvez des modification à apporter des commentaires, hésitez pas

Josué Clément
josue-clement@bluewin.ch


 Sources du même auteur

Source avec Zip CHRONOMÈTRE V2 [VISUAL C++ 6.0]
Source avec une capture LE PENDU
CHRONOMÈTRE [DEV - C++]
EFFET DE TEMPS + TEXTE
EFFET DE TEXTE

 Sources de la même categorie

Source avec Zip Source avec une capture ANALYSEUR LEXICAL par Donald180v
Source avec Zip Source avec une capture MAP_MAKER_JEU par seekplus
Source avec Zip Source avec une capture Source .NET (Dotnet) EMISSION D'UN OCTET SUR LE PORT SÉRIE - CLASSE SERIALPORT par jmchatelet01
Source avec Zip Source .NET (Dotnet) RESOLV EQU DE DEGRES N par darckangel731
Source avec Zip Source avec une capture Source .NET (Dotnet) INTEROP XCHAT / .NET : CHARGEUR DE PLUGINS MANAGÉS par TeBeCo

Commentaires et avis

Commentaire de Xs le 03/06/2002 23:32:49

j'avais jamais pensé a faire ça !!
pratique !

Commentaire de OriOn le 04/06/2002 21:45:58 administrateur CS

moi aussi j'ai fais une appli de ce genre en C mais elle est beaucoup moins complexe...

 Ajouter un commentaire




Nos sponsors


Sondage...

CalendriCode

Mai 2012
LMMJVSD
 123456
78910111213
14151617181920
21222324252627
28293031   

Consulter la suite du CalendriCode

A découvrir



 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 0,530 sec (4)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales