Help me to convert all to C++ (stdio.h)
-
#include
using namespace std;
int main()
{
const int b=14;
const float f=0.20;
cout<<"----------------"<>n;
cout<<"\nEnter the days of the loan : ";
int l;
cin>>l;
cout<<"\n-------------------------------------"<b){
cout< -
#include
using namespace std;
int main()
{
const int b=14;
const float f=0.20;
cout<<"----------------"<>n;
cout<<"\nEnter the days of the loan : ";
int l;
cin>>l;
cout<<"\n-------------------------------------"<b){
cout<Do you mean in this snippet was used some other than C++ language? :confused:
-
#include
using namespace std;
int main()
{
const int b=14;
const float f=0.20;
cout<<"----------------"<>n;
cout<<"\nEnter the days of the loan : ";
int l;
cin>>l;
cout<<"\n-------------------------------------"<b){
cout<Did you mean to say "Help me convert this code I found on the internet to C so I can turn it in as my own work?"
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
Dave Kreskowiak -
#include
using namespace std;
int main()
{
const int b=14;
const float f=0.20;
cout<<"----------------"<>n;
cout<<"\nEnter the days of the loan : ";
int l;
cin>>l;
cout<<"\n-------------------------------------"<b){
cout<it's already C++. What are you wanting ? classes ? I suggest using meaningful variable names instead of b or f or n.
CI/CD = Continuous Impediment/Continuous Despair
-
#include
using namespace std;
int main()
{
const int b=14;
const float f=0.20;
cout<<"----------------"<>n;
cout<<"\nEnter the days of the loan : ";
int l;
cin>>l;
cout<<"\n-------------------------------------"<b){
cout<If you mean to replace std::cout and std::cin with stdio.h functions, then look up the usage of printf() and scanf(), e. g. at C Library - <stdio.h> - Tutorialspoint[^] If you mean to convert everything to C, you also may need to remove the const qualifiers depending on the exact C compiler (and version) you are using.
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)