writing in .txt file by reading with .csv file in C/C++ [closed]












-2














/*I want to read global variable from .csv file
---------------
suppose in .csv Before comma value will be variable and after comma value variable value.
i,5.40
j,10.68
s,20.65
------------- */
int main() {
FILE *fp1 = fopen("input.csv" , "r");
FILE *fp2 = fopen("output.txt" , "w");

fprinf(fp2,"Sum of i and j = %.2f", i+j);
fprinf(fp2,"Division of s by j = %.2f", s/j);

return 0;
}


/* --------------------------
output.txt



sum of i and j = 16.08
Division of s by j =1.93
---------------------

Please help me in this program with C/C++ */


I want to read global variable from .csv file
Before comma value will be variable and after comma value










share|improve this question









New contributor




syam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











closed as off-topic by t3chb0t, papagaga, tinstaafl, Edward, Zeta Dec 21 at 16:12


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – t3chb0t, papagaga, tinstaafl, Edward

If this question can be reworded to fit the rules in the help center, please edit the question.













  • From the example: you want three global variables: i = 5.40, j = 10.68, s = 20.65 right?
    – Abrar
    Dec 21 at 10:06






  • 4




    Code review is about implemented code. You can't just ask that the code be written for you. Also, you need to decide if you want it to be in C or in C++: even if there's a partial compatibility, idioms vastly differ.
    – papagaga
    Dec 21 at 11:25
















-2














/*I want to read global variable from .csv file
---------------
suppose in .csv Before comma value will be variable and after comma value variable value.
i,5.40
j,10.68
s,20.65
------------- */
int main() {
FILE *fp1 = fopen("input.csv" , "r");
FILE *fp2 = fopen("output.txt" , "w");

fprinf(fp2,"Sum of i and j = %.2f", i+j);
fprinf(fp2,"Division of s by j = %.2f", s/j);

return 0;
}


/* --------------------------
output.txt



sum of i and j = 16.08
Division of s by j =1.93
---------------------

Please help me in this program with C/C++ */


I want to read global variable from .csv file
Before comma value will be variable and after comma value










share|improve this question









New contributor




syam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











closed as off-topic by t3chb0t, papagaga, tinstaafl, Edward, Zeta Dec 21 at 16:12


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – t3chb0t, papagaga, tinstaafl, Edward

If this question can be reworded to fit the rules in the help center, please edit the question.













  • From the example: you want three global variables: i = 5.40, j = 10.68, s = 20.65 right?
    – Abrar
    Dec 21 at 10:06






  • 4




    Code review is about implemented code. You can't just ask that the code be written for you. Also, you need to decide if you want it to be in C or in C++: even if there's a partial compatibility, idioms vastly differ.
    – papagaga
    Dec 21 at 11:25














-2












-2








-2







/*I want to read global variable from .csv file
---------------
suppose in .csv Before comma value will be variable and after comma value variable value.
i,5.40
j,10.68
s,20.65
------------- */
int main() {
FILE *fp1 = fopen("input.csv" , "r");
FILE *fp2 = fopen("output.txt" , "w");

fprinf(fp2,"Sum of i and j = %.2f", i+j);
fprinf(fp2,"Division of s by j = %.2f", s/j);

return 0;
}


/* --------------------------
output.txt



sum of i and j = 16.08
Division of s by j =1.93
---------------------

Please help me in this program with C/C++ */


I want to read global variable from .csv file
Before comma value will be variable and after comma value










share|improve this question









New contributor




syam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











/*I want to read global variable from .csv file
---------------
suppose in .csv Before comma value will be variable and after comma value variable value.
i,5.40
j,10.68
s,20.65
------------- */
int main() {
FILE *fp1 = fopen("input.csv" , "r");
FILE *fp2 = fopen("output.txt" , "w");

fprinf(fp2,"Sum of i and j = %.2f", i+j);
fprinf(fp2,"Division of s by j = %.2f", s/j);

return 0;
}


/* --------------------------
output.txt



sum of i and j = 16.08
Division of s by j =1.93
---------------------

Please help me in this program with C/C++ */


I want to read global variable from .csv file
Before comma value will be variable and after comma value







c++ csv






share|improve this question









New contributor




syam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




syam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited Dec 21 at 11:23









Abrar

1377




1377






New contributor




syam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Dec 21 at 9:21









syam

6




6




New contributor




syam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





syam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






syam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




closed as off-topic by t3chb0t, papagaga, tinstaafl, Edward, Zeta Dec 21 at 16:12


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – t3chb0t, papagaga, tinstaafl, Edward

If this question can be reworded to fit the rules in the help center, please edit the question.




closed as off-topic by t3chb0t, papagaga, tinstaafl, Edward, Zeta Dec 21 at 16:12


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – t3chb0t, papagaga, tinstaafl, Edward

If this question can be reworded to fit the rules in the help center, please edit the question.












  • From the example: you want three global variables: i = 5.40, j = 10.68, s = 20.65 right?
    – Abrar
    Dec 21 at 10:06






  • 4




    Code review is about implemented code. You can't just ask that the code be written for you. Also, you need to decide if you want it to be in C or in C++: even if there's a partial compatibility, idioms vastly differ.
    – papagaga
    Dec 21 at 11:25


















  • From the example: you want three global variables: i = 5.40, j = 10.68, s = 20.65 right?
    – Abrar
    Dec 21 at 10:06






  • 4




    Code review is about implemented code. You can't just ask that the code be written for you. Also, you need to decide if you want it to be in C or in C++: even if there's a partial compatibility, idioms vastly differ.
    – papagaga
    Dec 21 at 11:25
















From the example: you want three global variables: i = 5.40, j = 10.68, s = 20.65 right?
– Abrar
Dec 21 at 10:06




From the example: you want three global variables: i = 5.40, j = 10.68, s = 20.65 right?
– Abrar
Dec 21 at 10:06




4




4




Code review is about implemented code. You can't just ask that the code be written for you. Also, you need to decide if you want it to be in C or in C++: even if there's a partial compatibility, idioms vastly differ.
– papagaga
Dec 21 at 11:25




Code review is about implemented code. You can't just ask that the code be written for you. Also, you need to decide if you want it to be in C or in C++: even if there's a partial compatibility, idioms vastly differ.
– papagaga
Dec 21 at 11:25















active

oldest

votes






















active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

Список кардиналов, возведённых папой римским Каликстом III

Deduzione

Mysql.sock missing - “Can't connect to local MySQL server through socket”