Advertisement
ricardorichsn

nac_3_exer3

May 23rd, 2012
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.26 KB | None | 0 0
  1. #include<stdlib.h>
  2. #include<stdio.h>
  3.  
  4. int main()
  5. {
  6.     int x, tp;
  7.     printf("Digite um valor: ");
  8.     scanf("%d", &x);
  9.     tp = 3 * x;
  10.     printf("Triplo de %d: %d \n", x, tp);
  11.     do
  12.     {
  13.         printf(" - %d", x);
  14.         x++;
  15.     }while(x<=tp);
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement