Simple program in Programming C


Icon from Nuvola icon theme for KDE 3.x. Españ...

Icon from Nuvola icon theme for KDE 3.x. Español: Icono del tema de iconos Nuvola para KDE 3.x. Français : Icône du thème d’icônes Nuvola pour KDE 3.x. Русский: Иконка из темы Nuvola для KDE 3.x. Deutsch: Icon von Nuvola icon theme für KDE 3.x. Tiếng Việt: Biểu tượng lấy từ chủ đề icon Nuvola cho KDE 3.x. Ελληνικά: Εικόνα από το θέμα εικόνων Nuvola για το KDE 3.x. (Photo credit: Wikipedia)

C programming code for adding three numbers:

#include<stdio.h>

void main()
{
int a, b, c,d;

printf(“Enter three numbers to add\n”);
scanf(“%d%d%d”,&a,&b,&c);

d=a+b+c;

printf(“result = %d\n”,d);

return 0;
}

for minus

#include<stdio.h>

main()
{
int a, b, c,d;

printf(“Enter three numbers to subtraction\n”);
scanf(“%d%d%d”,&a,&b,&c);

d=a+b-c;

printf(“result = %d\n”,d);

return 0;
}

C programming code for multiplication  three numbers:

#include<stdio.h>

main()
{
int a, b, c,d;

printf(“Enter 3 numbers to multiplication\n”);
scanf(“%d%d%d”,&a,&b,&c);

d=a*b*c;

printf(“result = %d\n”,d);

return 0;
}

C programming code for dividing three numbers:

#include<stdio.h>

main()
{
int a, b, c,d;

printf(“Enter the 3  numbers to dividition\n”);
scanf(“%d%d%d”,&a,&b,&c);

d=(a+b)/c;

printf(“result

printf("hello, world\n");

printf(“hello, world\n”); (Photo credit: isipeoria)

= %d\n”,d);

return 0;
}

\n

Advertisements

One thought on “Simple program in Programming C

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s