দুইটি সংখ্যা দেওয়া আছে। তাদের যোগফলের জন্য সি প্রোগ্রাম:


1st Way:

#include <stdio.h>

int main()
{
    int num1, num2, sum;

    printf("Enter first number: ");
    scanf("%d", &num1);
    printf("Enter second number:");
    scanf("%d", &num2);

    sum = num1 + num2;

    printf("Sum of %d and %d = %d", num1, num2, sum);

    return 0;
}

2nd Way:

#include <stdio.h>

int main()
{
    int num1, num2, sum;

    printf("Enter any two numbers : ");
    scanf("%d%d", &num1, &num2);

    sum = num1 + num2;

    printf("Sum of %d and %d = %d\n", num1, num2, sum);

    return 0;
}

কোনকিছু না বুজলে কমেন্ট করুন

No comments

Powered by Blogger.