Scrigroup - Documente si articole

     

HomeDocumenteUploadResurseAlte limbi doc
AccessAdobe photoshopAlgoritmiAutocadBaze de dateCC sharp
CalculatoareCorel drawDot netExcelFox proFrontpageHardware
HtmlInternetJavaLinuxMatlabMs dosPascal
PhpPower pointRetele calculatoareSqlTutorialsWebdesignWindows
WordXml


APLICATII IN LIMBAJ C++, UTILE INAREA ASISTATA

c



+ Font mai mare | - Font mai mic



APLICATII IN LIMBAJ C++, UTILE IN PROIECTAREA ASISTATA

Exercitii introducere de date in C++



Ex1a

#include <iostream.h>

void main(void)

Ex1b

#include <iostream.h>

void main(void)

Ex2

#include <iostream.h>

void main(void)

Ex3

#include <iostream.h> //C++

#include <stdio.h> //C

void main(void)

Ex4

#include<iostream.h> //biblioteci de functii C++

void main(void) //functie principala

Ex5 Declaratii de date

#include<iostream.h>

void main(void)

Ex6

#include<iostream.h>

void main(void)

Ex7

#include <iostream.h>

int global_name = 1001;

void main(void)

Ex8

#include <iostream.h>

#include <iomanip.h>

void main(void)

listeaza:     0.000123

1.230000e-04

Ex

#include<iostream.h> //biblioteci de functii

float m; //decaratii

int a, b, c;

void main(void) //functia main

Ex

#include<iostream.h> //biblioteci de functii

float m; //decaratii

int a, b, c;

float media(void)

void main(void) //functia main

Ex9

#include <iostream.h>

#include <iomanip.h>

void main(void)

Ex10

#include <iostream.h>

void main(void)

Ex11

#include <iostream.h>

void main(void)

Ex12

#include<iostream.h> //biblioteci de functii C++

int values[5] = ;

int i;

void main(void)

Ex13 introducere de date

#include <iostream.h>

void main(void)

Ex

#include<iostream.h> //biblioteci de functii

void hello_world(void)

void main(void)

Ex14

#include<iostream.h>

int a,b,c;

int main()

Ex15

#include<iostream.h>

int SQ(int a, int c);

int main()

int SQ(int a, int c) //definire de functii in afara functiei principale

Ex16

#include<iostream.h>

int k;

float Td;

void main(void)

Ex17

#include<iostream.h>

#include <ctype.h> //toupper

#include<conio.h> //pentru functia getch

char inf;

void main(void)

}while(inf!='D' && inf!='N');}

Ex18

#include<iostream.h>

#include <ctype.h> //toupper

#include<conio.h> //pentru functia getch

#include<stdio.h> //biblioteci de functii

#include<conio.h>

char prel;

void alezare(void)

void falezare(void)

void main(void)

}while(prel!='1' && prel!='2');

}

Ex19

#include<iostream.h> //biblioteci de functii C++

#include<conio.h>

#include<stdlib.h> //exit

#include<stdio.h> //gets

#include<string.h> //strcpy

int a,b,c;

void inceput (void) //introducere parola

else cout<<'Corect !';}

int main()

Ex20

#include<iostream.h>

#include<stdio.h>

#include<conio.h>

#include<stdlib.h>

#include<string.h>

#include<ctype.h>

void rezultate(void);

void display(void);

int a,b,c;

char list;

int main()

void rezultate(void)

}while(list!='1' && list!='2'); }

void display(void)

Exercitiul 21 citirea unui fisier de date

#include<iostream.h>

#include<fstream.h>

#include<mem.h>

void calcule(void);

char v1[6],v1a[6],v2[6],v2a[6];

int a,b,c,fa;

main()

cout<<'rn Introduceti date:';

cout<<'rn Numar reper:';

cin>>v1;

cout<<'rn Cota de reparatie:';

cin>>v2;

do

}while(m1!=0 || m2!=0);

calcule();

fp.close();

return 0;}

void calcule(void) //exemplu de calcule

Fisierul date.txt

11100 ST 1 12 34

11100 R1 2 11 12

11110 ST 3 22 23

11110 R1 4 21 45

Exercitiul 22

#include<iostream.h> //biblioteci de functii

#include<fstream.h>

#include<conio.h>

#include<mem.h>

void calcule(void);

int sfarsit(void);

char V1[6],V1a[6],V2[6],V2a[6];

int a,b,c,fa;

float Lsemifabricat;

main()

cout<<'rn Introduceti date:';

cout<<'rn Numar reper:';

cin>>V1;

cout<<'rn Cota de reparatie:';

cin>>V2;

do

else return 0;}

}while(m1!=0 || m2!=0);

calcule();

cout<<'rn Scrie b='<<b; //verificare

fp.close();

return 0;}

void calcule(void)

int sfarsit(void)

Exercitiul 23 introducere de date

#include<iostream.h>

#include<fstream.h>

char V1[6], aliaj;

void fisier1(void)

void main(void)

Exercitiul 24 utilizarea functiilor

#include<iostream.h>

#include<fstream.h>

void Al_Sn(void);

void Cu_Pb(void);

char V1[6], V2[6], aliaj;

void fisier1(void)

void Al_Sn(void)

void Cu_Pb(void)

void main(void)

Exercitiul 25 Definirea unui proiect din douǎ fisiere Proj1.cpp si Proj2.cpp, cu introducerea parolei

Proj1.cpp

#include<iostream.h> //biblioteci de functii

#include<stdio.h>

#include<fstream.h>

#include<conio.h>

#include<mem.h>

#include<stdlib.h>

void calcule(void);

int sfarsit(void);

char V1[6],V1a[6],V2[6],V2a[6];

int a,b,c,fa;

void inceput (void) //introducere parola

else cout<<'Corect !';}

main()

cout<<'rn Introduceti date:';

cout<<'rn Numar reper:';

cin>>V1;

cout<<'rn Cota de reparatie:';

cin>>V2;

do

else return 0;}

}while(m1!=0 || m2!=0);

cout<<'rn Scrie b='<<b; //verificare

calcule();

cout<<'rn Scrie b='<<b; //verificare

fp.close();

return 0;}

Proj2.cpp

#include<iostream.h> //biblioteci de functii

#include<fstream.h>

#include<conio.h>

//#include<string.h>

float Lsemifabricat;

extern int a,b; //date declarate in Proiect1.cpp

void calcule(void)

int sfarsit(void)

Exercitiul 26 Aplicatie pentru crearea fisierelor script ce completeaza cu cote un desen de executie

//Program RUL32

#include<iostream.h>

#include<stdio.h>

#define pi 3.14159265;

void calcule(void);

void rezultate(void);

void display(void);

void printer(void);

int sfarsit(void);

void script(void);

char V1[6],V1a[6],list;

float D,d,B,DB,a,Da,da,Ba,DBa,aa;    //date de intrare

int z, Dp,TB,TP,RE; //etc.

void inceput (void) //introducere parola

//corpul functiei

main()

cout<<'rn Introduceti date:';

cout<<'rn Numar rulment:'; cin>>V1;

do

else return 0;}

}while(m1!=0);

calcule();

rezultate();

script();

fp.close();}

void calcule(void)

void rezultate(void)

}while(list!='1' && list!='2'); }

void display(void)

void printer(void)

int sfarsit(void)

void script(void)

fprintf(b1,'LAYER S text n');

fprintf(b1,'TEXT S iso 348.5,254.0 90 %.1fn',D);

fprintf(b1,'TEXT S iso 100.0,254.0 90 %.1fn',d);

fprintf(b1,'TEXT S iso 200.0,254.0 0 %.1fn',B);

fprintf(b1,'TEXT S iso 357.0,40.5 0 %sn',V1);

cout<<'rn Sa creat fisierul script1.scr' pentru .; //etc.

getche();

fclose(b1);}

daterul1.txt

72 35 27 36 10.319

80 40 30.2 41 11.906

APLICATIE MODEL

#include<iostream.h> //biblioteci de functii

#include<stdio.h>

#include<fstream.h>

#include<conio.h>

#include<mem.h>

#include<stdlib.h>

#include<string.h>

#include<ctype.h>

void calcule(void);

int sfarsit(void);

void display(void);

void printer(void);

void informatii(void);

void script(void);

void rezultate(void);

void fisier(void);

char V1[6],V1a[6],V2[6],V2a[6];

float a,b,c,fa;

float Lsemifabricat;

char list, inf;

void inceput (void) //introducere parola

else cout<<'Corect !';}

void help(void)

}while(inf!='D' && inf!='N');}

void informatii(void)

main()

cout<<'rn Introduceti date:';

cout<<'rn Numar reper:';

cin>>V1;

cout<<'rn Cota de reparatie:';

cin>>V2;

do

else return 0;}

}while(m1!=0 || m2!=0);

calcule();

rezultate();

script();

fp.close();

return 0;}

int sfarsit(void)

void calcule(void)

void rezultate(void)

}while(list!='1' && list!='2'); }

void display(void)

void printer(void)

void fisier(void)

fprintf(fr,'rn%6s%3s%2.1f%2.1f%2.1f',&V1,&V2,&a,&b,&c);

cout<<'rn a = '<<a;

fclose(fr);

void script(void)

fprintf(b1,'LAYER S text n');

fprintf(b1,'TEXT S iso 348.5,254.0 90 %.1fn',a);

fprintf(b1,'TEXT S iso 100.0,254.0 90 %.1fn',b);

fprintf(b1,'TEXT S iso 200.0,254.0 0 %.1fn',c);

fprintf(b1,'TEXT S iso 357.0,21.2 0 %sn',V1);

cout<<'rn Sa creat fisierul script1.scr' ;

getche();

fclose(b1);}

APLICATIE MODEL Proiect

Date.txt

11100 16 12 34

11110 24 11 12

11111 36 22 23

11112 42 21 45

MAIN.CPP

#include<iostream.h> //biblioteci de functii

#include<stdio.h>

#include<fstream.h>

#include<conio.h>

#include<mem.h>

#include<stdlib.h>

#include<string.h>

#include<ctype.h>

void calcule(void);

int sfarsit(void);

void display(void);

void printer(void);

void informatii(void);

void script(void);

void rezultate(void);

char V1[6],V1a[6];

float a,b,c,fa; //*

float Lsemifabricat;

char list, inf;

void inceput (void) //introducere parola

else cout<<'Corect !';}

void help(void)

}while(inf!='D' && inf!='N');}

void informatii(void)

main()

cout<<'rn Introduceti date:';

cout<<'rn Numar reper:';

cin>>V1;

do

else return 0;}

}while(m1!=0);

calcule();

rezultate();

script();

fp.close();

return 0;}

void calcule(void)

SCRIPT.CPP

#include<iostream.h> //biblioteci de functii

#include<stdio.h>

#include<fstream.h>

#include<conio.h>

#include<mem.h>

#include<stdlib.h>

#include<string.h>

#include<ctype.h>

void calcule(void);

int sfarsit(void);

void display(void);

void printer(void);

void informatii(void);

void script(void);

void rezultate(void);

extern char V1[6],V1a[6];

extern float a,b,c,fa; //*

extern float Lsemifabricat;

extern char list, inf;

void rezultate(void)

}while(list!='1' && list!='2'); }

void display(void)

void printer(void)

void script(void)

fprintf(b1,'LAYER S text n');

fprintf(b1,'TEXT S iso 197,238 0 %%%%c%.1fn',a); //*

fprintf(b1,'TEXT S iso 197,227 0 %%%%c%.1fn',b);

fprintf(b1,'TEXT S iso 267,187 90 %.1fn',c);

fprintf(b1,'TEXT S iso 364,24 0 %sn',V1);

cout<<'rn S-a creat fisierul script1.scr' ;

getche();

fclose(b1);}

int sfarsit(void)

POO

#include <iostream.h>

#include <iomanip.h>

#include <string.h>

class Book

;

void Book::show_title(void)

;

float Book::get_price(void)

;

void Book::show_book(void)

;

void Book::assign_publisher(char *name)

;

void Book::show_publisher(void)

;

void main(void)

Ex

#include <iostream.h>

class object

;

object::object(void) : a(1), b(2), c(3) ;

void object::show_object(void)

void main(void)



Politica de confidentialitate | Termeni si conditii de utilizare



DISTRIBUIE DOCUMENTUL

Comentarii


Vizualizari: 1200
Importanta: rank

Comenteaza documentul:

Te rugam sa te autentifici sau sa iti faci cont pentru a putea comenta

Creaza cont nou

Termeni si conditii de utilizare | Contact
© SCRIGROUP 2024 . All rights reserved