My Math Forum  

Go Back   My Math Forum > Science Forums > Computer Science

Computer Science Computer Science Forum


Closed Thread
 
LinkBack Thread Tools Display Modes
April 19th, 2018, 06:40 AM   #1
Banned Camp
 
Joined: Nov 2017
From: india

Posts: 204
Thanks: 1

what is diffrence between these code?

hello
Code:
#include<stdio.h>
 
int main()
{
   int a, b, c;
 
   printf("Enter two numbers to add\n");
   scanf("%d%d", &a, &b);
 
   c = a + b;
 
   printf("Sum of the numbers = %d\n", c);
 
   return 0;
}
Code:
import java.util.*;
 
class Add
{
   public static void main(String args[])
   {
      int x, y, z;
 
      System.out.println("Enter two integers to calculate their sum");
      Scanner sc = new Scanner(System.in);
 
      x = sc.nextInt();
      y = sc.nextInt();
      z = x + y;
 
      System.out.println("Sum of the integers = " + z);
   }
}
integration is offline  
 
April 19th, 2018, 06:40 AM   #2
Banned Camp
 
Joined: Nov 2017
From: india

Posts: 204
Thanks: 1

java and C ??
integration is offline  
Closed Thread

  My Math Forum > Science Forums > Computer Science

Tags
code, diffrence



Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
code student360 Computer Science 1 November 2nd, 2011 05:02 PM
Pi Code+Phi code..please complete Keith742 Algebra 1 June 21st, 2009 06:09 PM
Code generation, probability of generating same code twice NateL Algebra 2 July 15th, 2008 07:07 PM
Finite Diffrence windmill_8x Calculus 0 November 17th, 2007 11:10 AM





Copyright © 2018 My Math Forum. All rights reserved.