Search:

Type: Posts; User: Staticity

Search: Search took 0.19 seconds.

  1. Replies
    7
    Views
    3,530

    [SOLVED] Re: Counting Addition "Carries"

    import java.util.*;

    public class friday {
    public static void main(String args[]){
    Scanner scan = new Scanner(System.in);
    System.out.println("Enter number of times to run");
    int count =...
  2. Replies
    7
    Views
    3,530

    [SOLVED] Re: Counting Addition "Carries"

    Say I wanted to add 199991 and 9... The leading 0 wouldn't really work. Is there a better resolution? I know I could use a For loop to add 0 to the beginning until the lengths are the same, but that...
  3. Replies
    7
    Views
    3,530

    [SOLVED] Re: Counting Addition "Carries"

    I don't believe it would work with 49 + 51..
    .. Because 9 + 1 is greater than 9 and carries a 1..
    However, the 1 doesn't carry over to 5 + 4.. so 5+4 = 9 and won't add a carry..

    To do the...
  4. Replies
    7
    Views
    3,530

    [SOLVED] Counting Addition "Carries"

    So, I just came back from a CS Competition, and there was this one question that asked this:
    "You will be given a .in file that will contain a number "n" which is the number of times to loop the...
Results 1 to 4 of 4