>>11149751int base = 0, multiplier =0, count = 0, answer = 0;
Scanner scan = new Scanner(
System.in);
System.out.print("Enter base number ->");
base = scan.nextInt();
System.out.print("\nEnter multiplier ->");
multiplier = scan.nextInt();
if(base < 0)
{System.out.println("Invalid Input.");}
do{
answer = base + base;
count++;
}while(count != multiplier);
System.out.println(answer);
Is that python or JS? I wrote mine in Java. I might actually make two methods for if the numbers if it is a positive or negative equation.
I also didn't use doubles or floats to account for decimals.
The program would require some more tinkering, but not too much to work in decimals/negatives/fractions.