#include <stdio.h>
int main(void)
{
int anika;
int jakir;
printf("Please give the value of Anika:\n");
scanf("%d",&anika);
printf("Please give the value of Jakir:\n");
scanf("%d",&jakir);
printf("The addition is: %d\n", anika+jakir);
printf("The Subtraction is: %d\n", anika-jakir);
printf("The Multiplication is: %d\n", anika*jakir);
printf("The Division is: %d\n", anika/jakir);
system("pause");
return 0;
}
Friday, December 10, 2010
Labels: Input Output
Friday, December 10, 2010
#includeint main(void) { int anika=10; int jakir=5; printf("The addition is: %d\n", anika+jakir); printf("The Subtraction is: %d\n", anika-jakir); printf("The Multiplication is: %d\n", anika*jakir); printf("The Division is: %d\n", anika/jakir); system("pause"); return 0; }
This is the output:
The addition is: 15 The addition is: 5 The addition is: 50 The addition is: 2
Friday, December 10, 2010
#include <stdio.h>
int main(void)
{
int *p;
int anikas_son=2;
p=&anikas_son;
printf("%d\n",*p);
system("pause");
return 0;
}
This is the output:
2
Labels: Pointer
Friday, December 10, 2010
#include <stdio.h>
int main(void)
{
int i=0;
do
{
printf("JAKIR:\tI LOVE YOU ANIKA\n");
i++;
}while(i<=5);
system("pause");
return 0;
}
This is the output:
JAKIR: I LOVE YOU ANIKA JAKIR: I LOVE YOU ANIKA JAKIR: I LOVE YOU ANIKA JAKIR: I LOVE YOU ANIKA JAKIR: I LOVE YOU ANIKA JAKIR: I LOVE YOU ANIKA
Labels: Do While Loop
Friday, December 10, 2010
#include <stdio.h> #includeThis is the output:int main(void) { int i=0; while(i<=5) { printf("JAKIR:\tI LOVE YOU ANIKA\n"); i++; } system("pause"); return 0; }
JAKIR: I LOVE YOU ANIKA JAKIR: I LOVE YOU ANIKA JAKIR: I LOVE YOU ANIKA JAKIR: I LOVE YOU ANIKA JAKIR: I LOVE YOU ANIKA JAKIR: I LOVE YOU ANIKA
Labels: While Loop
Friday, December 10, 2010
#include <stdio.h>
int main(void)
{
int i;
for(i=0;i<5;i++)
{
printf("JAKIR:\tI LOVE YOU ANIKA\n");
}
system("pause");
return 0;
}
This is the output:
JAKIR: I LOVE YOU ANIKA JAKIR: I LOVE YOU ANIKA JAKIR: I LOVE YOU ANIKA JAKIR: I LOVE YOU ANIKA JAKIR: I LOVE YOU ANIKA
Labels: For Loop
Friday, December 10, 2010
#include <stdio.h>
int main(void)
{
printf("\tANIKA\n");
printf("\?\?JAKIR\?\?\n");
printf("\"ANIKA+JAKIR\"");
system("pause");
return 0;
}
This is the output:
ANIKA ??JAKIR?? "ANIKA+JAKIR"
Labels: Escape Sequence
Subscribe to:
Comments (Atom)