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. there is something seriously wrong with this...

there is something seriously wrong with this...

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestionlearning
6 Posts 4 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.
  • P Offline
    P Offline
    Pathetic
    wrote on last edited by
    #1

    ok, i tried to make this code awhile ago, and it doesnt work at all, and i was wondering if someone could help me figure it out?? But please, not to sound rude, but for the sake of learning something, try to explain it in the simplest terms you can what was wrong, so I can avoid doing that mistake again

    #include <iostream>
    #include <iomanip>
    using namespace std;
    
    void main()
    {//start
    
    	int i,
    		j,
    		number;
    	
    		cout<<setw(40)<<"Multiplication Chart"<<endl<<endl;
    		cout>>"This is a multiplication Chart"<<endl<<endl
    			cout<<"please enter a number between 1 and 17 for the table to reach up to. Numbers larger then 17 will NOT work"<<endl;
    		cin>>number;
    
    		for (i=0; i<number; i++)
    			(
    			cout<<i<<"I";
    
    		for (j=0; j<number; j<+)
    			cout<<setw(3) i*j;
    		}
    		cout<<endl;
    	}
    	system ("PAUSE");
    }
    

    :I

    D J R 3 Replies Last reply
    0
    • P Pathetic

      ok, i tried to make this code awhile ago, and it doesnt work at all, and i was wondering if someone could help me figure it out?? But please, not to sound rude, but for the sake of learning something, try to explain it in the simplest terms you can what was wrong, so I can avoid doing that mistake again

      #include <iostream>
      #include <iomanip>
      using namespace std;
      
      void main()
      {//start
      
      	int i,
      		j,
      		number;
      	
      		cout<<setw(40)<<"Multiplication Chart"<<endl<<endl;
      		cout>>"This is a multiplication Chart"<<endl<<endl
      			cout<<"please enter a number between 1 and 17 for the table to reach up to. Numbers larger then 17 will NOT work"<<endl;
      		cin>>number;
      
      		for (i=0; i<number; i++)
      			(
      			cout<<i<<"I";
      
      		for (j=0; j<number; j<+)
      			cout<<setw(3) i*j;
      		}
      		cout<<endl;
      	}
      	system ("PAUSE");
      }
      

      :I

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      Pathetic wrote:

      it doesnt work at all,

      Aside from the syntax errors, what does it do compared to what it's supposed to do?

      "Love people and use things, not love things and use people." - Unknown

      "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

      P 1 Reply Last reply
      0
      • P Pathetic

        ok, i tried to make this code awhile ago, and it doesnt work at all, and i was wondering if someone could help me figure it out?? But please, not to sound rude, but for the sake of learning something, try to explain it in the simplest terms you can what was wrong, so I can avoid doing that mistake again

        #include <iostream>
        #include <iomanip>
        using namespace std;
        
        void main()
        {//start
        
        	int i,
        		j,
        		number;
        	
        		cout<<setw(40)<<"Multiplication Chart"<<endl<<endl;
        		cout>>"This is a multiplication Chart"<<endl<<endl
        			cout<<"please enter a number between 1 and 17 for the table to reach up to. Numbers larger then 17 will NOT work"<<endl;
        		cin>>number;
        
        		for (i=0; i<number; i++)
        			(
        			cout<<i<<"I";
        
        		for (j=0; j<number; j<+)
        			cout<<setw(3) i*j;
        		}
        		cout<<endl;
        	}
        	system ("PAUSE");
        }
        

        :I

        J Offline
        J Offline
        jeron1
        wrote on last edited by
        #3

        Doesn't look like it should compile either.

        1 Reply Last reply
        0
        • P Pathetic

          ok, i tried to make this code awhile ago, and it doesnt work at all, and i was wondering if someone could help me figure it out?? But please, not to sound rude, but for the sake of learning something, try to explain it in the simplest terms you can what was wrong, so I can avoid doing that mistake again

          #include <iostream>
          #include <iomanip>
          using namespace std;
          
          void main()
          {//start
          
          	int i,
          		j,
          		number;
          	
          		cout<<setw(40)<<"Multiplication Chart"<<endl<<endl;
          		cout>>"This is a multiplication Chart"<<endl<<endl
          			cout<<"please enter a number between 1 and 17 for the table to reach up to. Numbers larger then 17 will NOT work"<<endl;
          		cin>>number;
          
          		for (i=0; i<number; i++)
          			(
          			cout<<i<<"I";
          
          		for (j=0; j<number; j<+)
          			cout<<setw(3) i*j;
          		}
          		cout<<endl;
          	}
          	system ("PAUSE");
          }
          

          :I

          R Offline
          R Offline
          Rajesh R Subramanian
          wrote on last edited by
          #4

          There were a few syntax errors in your program. Besides that, if you were looking to start with a simple multiplication program, I just wrote one for you:

          #include <iostream>

          void main()
          {
          int number, limit = 10;
          cout<<"Multiplication Chart"<<endl<<endl;
          cout<<"please enter a number to view multiplication chart ";
          cin>>number;
          cout<<endl;
          for(int i=1; i<= limit; ++i)
          {
          cout<<number<<" x "<<i<< " = "<<number*i<<endl;
          }
          cout<<endl;
          }

          Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

          P 1 Reply Last reply
          0
          • R Rajesh R Subramanian

            There were a few syntax errors in your program. Besides that, if you were looking to start with a simple multiplication program, I just wrote one for you:

            #include <iostream>

            void main()
            {
            int number, limit = 10;
            cout<<"Multiplication Chart"<<endl<<endl;
            cout<<"please enter a number to view multiplication chart ";
            cin>>number;
            cout<<endl;
            for(int i=1; i<= limit; ++i)
            {
            cout<<number<<" x "<<i<< " = "<<number*i<<endl;
            }
            cout<<endl;
            }

            Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

            P Offline
            P Offline
            Pathetic
            wrote on last edited by
            #5

            thanks i guess

            "The beauty of Grace is that it makes life not fair" Relient K, Be my Escape

            1 Reply Last reply
            0
            • D David Crow

              Pathetic wrote:

              it doesnt work at all,

              Aside from the syntax errors, what does it do compared to what it's supposed to do?

              "Love people and use things, not love things and use people." - Unknown

              "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

              P Offline
              P Offline
              Pathetic
              wrote on last edited by
              #6

              uh... can you please rephrase that question, i dont get it...

              "The beauty of Grace is that it makes life not fair" Relient K, Be my Escape

              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