c언어 기초반 연습문제

kimseunghoo · January 24, 2026
#include <stdio.h>

int main() {
   int f1,f2;
   //  int n1,n2,result;
   // scanf("%d  %d", &n1,&n2);
   // result = n1 - n2;
   // if(result < 0){
   //     # result = result * -1;
        
    // #printf("%d\n", result);
    // scanf("%d %d", &f1 ,&f2);
    // if( -1000 <= f1 && f1 <= 1000 && -1000 <= f2 && f2<= 1000){
    //     if(f1 < f2 ){
    //     printf("%d \n", f1);
    // }else if (f1 > f2){
    //     printf("%d\n", f2); 
    // }else{
    //     return 0;
    // }
    // }
    int k,n;
    scanf("%d %d",&k ,&n);
    for(int i=1;i<=n;i++){
        printf("%d ", k);
        k+=3;
    }
    

            }    
    

Output

Comments

Please sign up or log in to contribute to the discussion.