don't send error

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#include <cstdlib>
#include <iostream>


using namespace std;

int a();
int b();
int c();

int main ()
{
	char ch;
	cout <<"pasirinkite viena varianta is a Litas-Euras,b Litas-Doleris,c Litas-Svaras"<<endl;
	cout <<"noredami nutraukti darba iveskite #"<<endl;
	while ((ch=getchar())!='#')
	{
		if(ch!=' ')
		switch(ch)
		{
			case 'a':printf("Litas-Euras\n");a();
				break;
			case 'b':printf("Litas-Doleris\n");b();
				break;
			case 'c':printf("Litas-Svaras\n");c ();
				break;
		}
		else
			cout << "Jus ivedete tarpo klavisa, noredami testi iveskite raide , arba noredami baigti #\n"<<endl;
	}
}

int a()
{
    int a,b;
printf("Irasyktite litu suma\n");
scanf("%d" , a);
b=a*3/5 ;
printf ( "b" );
return b;
}

int b()
{
    int a,b;
scanf("%d" , a);
b=a*2/3 ;
printf ( "b" );
return b;
}

int c ()

{
    int a,b;
printf("Irasyktite litu suma\n");
scanf("%d" , a);
b=a*4/5 ;
printf ( "b" );
return b;
}

after I select one of the options , I should write a number and I should get a result , but I just get don't send error when I try to do that , program compiles.
You mean you want to show the numbers returned by functions a() b() and c() depending on you selection?
At your code, line 21, you have a(); which doesn't show any numbers. It just call function a(). You should use something to print it to the console
cout << a();
may i ask what language is this? cant understand a word.. heheh
I changed few things ant this program works now.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#include <cstdlib>
#include <iostream>


using namespace std;

int a();
int b();
int c();
//meniu

int main (void)
{
    //pristatymas
    cout << " Si programa skaiciuoja apytikslia suma , kad lengviau butu pirkti is Ebay, " << endl;
    cout << " Steam ar kitu komerciniu korporaciju " << endl;  
    cout << " ,delto, kad valiutu kursas keiciasi! " << endl;
    cout << endl;
    cout << endl;
    //pristatymas
// pasirinktys	
    char ch;
	cout <<"Pasirinkite viena varianta is a > Litas-Euras,b > Litas-Doleris,c > Litas-Svaras"<<endl;
	cout <<"noredami nutraukti darba iveskite #"<<endl;
	while ((ch=getchar())!='#')
	{
		if(ch!=' ')
		switch(ch)
		{
			case 'a':cout << "Euras-Litas\n" << endl;cout << a();
				break;
			case 'b':cout << "Doleris-Litas\n" << endl;cout << b();
				break;
			case 'c':cout << "Svaras-Litas\n" << endl;;cout << c();
				break;
		}
		else
			cout << "Jus ivedete tarpo klavisa, noredami testi iveskite raide , arba noredami baigti #\n"<<endl;
	}
}
// pasirinktys
//meniu
//Euro skaiciavimas
int a()
{
    
  double a,b,c;
  c=3.5;
cout << "Irasyktite euru suma\n" << endl;
cin >> a;
cout << endl;
b=a*c ;
cout << a << endl;
cout << "euru sudaro" <<endl;
cout << b << endl;
cout << "litu" << endl;
cout << endl;
cout << endl;
cout << endl;
return 0 ;
}
//Euro skaiciavimas

//Dolerio skaiciavimas
int b()
{
    double a,b,c;
    c=2.3;
cout << "Irasyktite doleriu suma\n" << endl;
cin >> a;
cout << endl;
b=a*c ;
cout << a << endl;
cout << "doleriu sudaro" <<endl;
cout << b << endl;
cout << "litu" << endl;
cout << endl;
cout << endl;
cout << endl;
return 0 ;
}
//Dolerio skaiciavimas

//Svaro skaiciavimas
int c()

{
    double a,b,c;
    c=4.5;
cout << "Irasyktite svaru suma\n" << endl;
cin >> a;
cout << endl;
b=a*c ;
cout << a << endl;
cout << "svaru sudaro" <<endl;
cout << b << endl;
cout << "litu" << endl;
cout << endl;
cout << endl;
cout << endl;
return 0 ;
}
//Svaro skaiciavimas 
Topic archived. No new replies allowed.