please help me find the error guys, they said expected unqualified-id before '{' token at line 11, col 19..
-
#include
#include
using namespace std;float addition (float &a, float &b){
float sum = a + b;
b+=b;
return sum;}float int{
float x, y, c, d;{
cout<<"Masukan nilai x : ";
cin>>x;
cout<<"Masukan nilai y : ";
cin>>y;
c = 6;
d = 4;
cout << "Nilai x sebelum memanggil fungsi addition = " << c << endl;
cout << "Nilai y sebelum memanggil fungsi addition = " << d << endl;
cout << "------------------------------------------- " < -
#include
#include
using namespace std;float addition (float &a, float &b){
float sum = a + b;
b+=b;
return sum;}float int{
float x, y, c, d;{
cout<<"Masukan nilai x : ";
cin>>x;
cout<<"Masukan nilai y : ";
cin>>y;
c = 6;
d = 4;
cout << "Nilai x sebelum memanggil fungsi addition = " << c << endl;
cout << "Nilai y sebelum memanggil fungsi addition = " << d << endl;
cout << "------------------------------------------- " <Try to move all the '{' and '}' symbols to the new lines and properly format the resulting code...
-
#include
#include
using namespace std;float addition (float &a, float &b){
float sum = a + b;
b+=b;
return sum;}float int{
float x, y, c, d;{
cout<<"Masukan nilai x : ";
cin>>x;
cout<<"Masukan nilai y : ";
cin>>y;
c = 6;
d = 4;
cout << "Nilai x sebelum memanggil fungsi addition = " << c << endl;
cout << "Nilai y sebelum memanggil fungsi addition = " << d << endl;
cout << "------------------------------------------- " < -
#include
#include
using namespace std;float addition (float &a, float &b){
float sum = a + b;
b+=b;
return sum;}float int{
float x, y, c, d;{
cout<<"Masukan nilai x : ";
cin>>x;
cout<<"Masukan nilai y : ";
cin>>y;
c = 6;
d = 4;
cout << "Nilai x sebelum memanggil fungsi addition = " << c << endl;
cout << "Nilai y sebelum memanggil fungsi addition = " << d << endl;
cout << "------------------------------------------- " <Where's
main()
?"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles