Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Help me to convert all to C++ (stdio.h)

Help me to convert all to C++ (stdio.h)

Scheduled Pinned Locked Moved C / C++ / MFC
c++help
5 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    WEI SHEN KOK
    wrote on last edited by
    #1

    #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<

    V D M S 4 Replies Last reply
    0
    • W WEI SHEN KOK

      #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<

      V Offline
      V Offline
      Victor Nijegorodov
      wrote on last edited by
      #2

      Do you mean in this snippet was used some other than C++ language? :confused:

      1 Reply Last reply
      0
      • W WEI SHEN KOK

        #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<

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        • W WEI SHEN KOK

          #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<

          M Offline
          M Offline
          Maximilien
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          • W WEI SHEN KOK

            #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<

            S Offline
            S Offline
            Stefan_Lang
            wrote on last edited by
            #5

            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)

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups