My Computer Forum Computer Science Forum

Go Back   My Computer Forum > Computer Science Forum > Programming

Programming Programming Languages, Interpreters, and Compilers - Assembly, Declarative, Machine, Object Oriented, Iterative


Reply
 
LinkBack Thread Tools Display Modes
August 30th, 2011, 06:08 AM   #1
 
Joined: Aug 2011
Posts: 1
C++ question...awesome question....challenging too !!!

[attachment=0:24mzkdut]output.JPG[/attachment:24mzkdut]

How to write the c++ code for this sorta question....i couldnt get the logic even.....

to print the factors of a number given by the user in a pyramid pattern...like if 4 is the number given by the user...its factors are 1,2,4...the we hv to print that in the format i hv provided in the attachment.....

I hv attached a file to show how the output must look like....plez help !!!
Attached Images
File Type: jpg output.JPG (23.8 KB, 1584 views)
Vishal Srinivas is offline  
 

My Computer Forum is free to register and we welcome everyone!

July 3rd, 2013, 09:25 PM   #2
 
Joined: Jul 2013
Posts: 4
Re: C++ question...awesome question....challenging too !!!

Looks like you need to use some kind of skip character command. Shouldn't be too hard. you could say cout << " 1 " << endl;
cout << " 2 " << endl;

etc
Shamieh is offline  
Reply

  My Computer Forum > Computer Science Forum > Programming

Tags
questionawesome, questionchallenging



Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
some basic question mhhjt Artificial Intelligence 0 November 1st, 2013 02:01 PM
A question I am struggling with dag1602 OS Architecture 0 November 17th, 2009 07:30 PM
Another C++ question jacksonwee Programming 5 April 24th, 2008 09:29 AM
C++ Question jacksonwee Programming 10 April 18th, 2008 11:34 AM
C++ Programming Question johnny Programming 3 December 30th, 2007 01:20 PM





Copyright © 2017 My Computer Forum Forum. All rights reserved.