#include <stdio.h> main () { int num1, num2 , sum; printf("enter the two integer values to be added"); scanf ("%d %d", &num1 ,&num2); sum=num1+num2; printf("addition of %d and %d = %d \n", num1 , num2 ,sum); }
#include<stdio.h> #include<windows.h> int main() { SetConsoleTitle("Name and Age - by Zahid Wadiwale"); int a; char ar[50]; printf("enter name \n"); scanf("%[^\n]",&ar); printf("enter age \n"); scanf("%d",&a); printf("your name is %s and age is %d \n",ar,a); return 0; }
/* Tic Tac Toe game - tictacto.c Author : Zahid Wadiwale This is a simple Tic Tac Toe game. I have used conio2.h that is not a part of the C standard and not available in Dev-C++ by default. Please let me know if you find and error or if you have any questions. I have also attached libconio.a , libconio_unicode.a and conio2.h Enjoy! */ #include <stdio.h> #include <conio2.h> #include<windows.h> #define UPARROW 72 #define DOWNARROW 80 #define LEFTARROW 75 #define RIGHTARROW 77 #define ENTER 13 #define QUIT 'q' int _x,_y; //To track the position of the Tic Tac Toe frame being drawn //Function to show the Tic Tac Toe Frame void showframe(int posx, int posy) { int hr=196, vr=179; // These are ascii character which display the lines int crossbr=197; ...
// Performs addition, subtraction, multiplication or division depending the input from user build by Zahid Wadiwale # include <stdio.h> #include<windows.h> int main() { SetConsoleTitle("Calculator Project - by Zahid Wadiwale"); char operator; double firstNumber,secondNumber; printf(" Zahid Calculator in C \n Enter an operator (+, -, *,/,): "); scanf("%c", &operator); printf("Enter two operands: "); scanf("%lf %lf",&firstNumber, &secondNumber); switch(operator) { case '+': printf("%.1lf + %.1lf = %.1lf",firstNumber, secondNumber, firstNumber + secondNumber); break; ...
Comments
Post a Comment