willieshi232

Untitled

Oct 21st, 2015
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. 2.
  2. public static void rep1(String word, int multi)
  3. {
  4. for(int x = 0 x <= multi; x++)
  5. {
  6. System.out.print(word)
  7. }
  8. }
  9. 4. public static void daysinMonth(int month)
  10. {
  11. if(month = 1){
  12. System.out.print("31");
  13. } else if(month = 2){
  14. System.out.print("28");
  15. } else if(month = 3){
  16. System.out.print("31");
  17. } else if(month = 4){
  18. System.out.print("30");
  19. } else if(month = 4){
  20. System.out.print("31");
  21. } else if(month = 5){
  22. System.out.print("30");
  23. } else if(month = 6){
  24. System.out.print("31");
  25. } else if (month = 7){
  26. System.out.print("31");
  27. } else if (month = 8){
  28. System.out.print("31");
  29. } else if (month = 9){
  30. System.out.print("30");
  31. } else if (month = 10){
  32. System.out.print("31");
  33. } else if (month = 11){
  34. System.out.print("30");
  35. } else if (month = 12){
  36. System.out.print("31:);
  37. }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment