~cpp //자바 public class AtleastSum { public static void main(String args[]) { int n=0; int sum=0; while(sum<3000) { n++; sum+=n; } System.out.println("n= "+n+" sum = "+sum); } }